0% found this document useful (0 votes)
113 views

Sem 3 Project Report IIT-ISM

Uploaded by

Jack
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
113 views

Sem 3 Project Report IIT-ISM

Uploaded by

Jack
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 20

STUDY OF SIMULATION OF SOME BASIC CIRCUITS

IN MATLAB/SIMULINK ENVIRONMENT

UNDER GUIDANCE OF PROF. P.K. SADHU

Project By: Siddharth Singh


3rd semester
B.Tech Electrical Engineering
16JE001954
Study of Simulation of some basic circuits in MATLAB/Simulink environment

Index

1. Acknowledgement...........................................................................................................3
2. Abstract............................................................................................................................4
3. Introduction.....................................................................................................................5
a. What is MATLAB? ............................................................................................5
b. History.................................................................................................................5
c. Why do we use MATLAB?................................................................................5
d. Advantages and Disadvantages..........................................................................6
4. Study of series RLC circuit.............................................................................................7
5. Study of parallel RLC circuit..........................................................................................9
6. Study of single-phase transmission line.........................................................................11
7. Study of three-phase transmission line...........................................................................13
8. Study of electronic meter...............................................................................................15
9. Conclusions....................................................................................................................18
10. Reference.......................................................................................................................19

2
Study of Simulation of some basic circuits in MATLAB/Simulink environment

Acknowledgement
I woul d l i ke to express m y si ncere grat i t ude t o m y m ent or P rof. P .K. S adhu, for provi di ng m e hi s
exem pl ary gui dance and const ant encouragem ent t hroughout t he course of t hi s proj ect . Hi s cordi al
support and val uabl e i nform at i on hel ped m e face t he chal l enges t hat cam e across whil e worki ng on thi s
proj ect .

I al so t ake t hi s opport uni t y t o express my deep regards to t he JR F s of El ect ri cal Engi neeri ng
Depart m ent for thei r support and i nval uabl e com m ent s and suggest i ons whi ch hel ped m e i n com pl et i ng
t hi s t ask t hrough vari ous st ages.

Last l y, I t hank my parent s and fri ends for thei r const ant encourag em ent wit hout whi ch t hi s proj ect
woul d not be possi bl e.

3
Study of Simulation of some basic circuits in MATLAB/Simulink environment

Abstract
Wi t h t he advancem ent s i n com put er t echnol ogy, st udent s, resea rch ers and innovat ors fi nd it handy t o
com put e and si m ul at e t hei r worki ng m odel s in an envi ronm ent provi ded by soft wares l i ke MATLAB .
Si m ul at i on not onl y hel ps i n bet t er underst andi ng of t he m odel but al so cut s down the t i m e used and
t he pri ces of t he experi m ent al prot ot ypes. MATLAB is one of t he wi del y used soft wares due to pl ent y
of addi t i onal li brari es and t he S im ul i nk add- on. It s uni que int egrat i on wi t h the Si m uli nk envi ronm ent
offers a perfect Graphi cal User Int erf ace (GUI) for t he user whi ch i s rarel y found som ewher e el se. It s
li brari es cont ai n speci fi c hi gher l evel funct i ons whi ch resul t s i n fast er m at hem at i cal com put at i ons than
ot her si m i l ar soft wares. Thi s speeds up the devel opm ent of advanced appl i cat i ons. In t hi s proj ect , som e
basi c el ect ri cal ci rcui t s are m odel l ed i n t he S im ul i nk envi ronm ent and correspondi ng resul t s whi ch are
generat ed are anal ysed.

4
Study of Simulation of some basic circuits in MATLAB/Simulink environment

Introduction
What is MATLAB?
MATLAB st ands for MATri x LAB orat ory. It i s a speci al purpose com put er program opti m i zed to
perform engi neeri ng and sci ent i fi c cal cul at i ons. It st art ed li fe as a program desi gned to perform m at ri x
m at hem at i cs, but over the years it has grown i nt o a fl exi bl e com puti ng syst em capabl e of sol vi ng
essent i al l y any t echni cal probl em .
The MATLAB program i m pl em ent s t he MATLAB l anguage and provi des a very ext ensi ve li brary of
predefi ned funct i ons to m ake t echni cal program m i ng t asks easi er and m ore effi ci ent . These ext rem el y
wi de vari et i es of funct i ons m ake it much easi er t o sol ve t echni cal probl em s i n MATLAB t han in ot her
l anguages such as F OR TR AN or C . MATLAB i s wi despread across all sci ent i fi c di sci pli nes m ai nl y due
t o a sim pl e synt ax, st abi l i t y and a wi de range of appl i cabi l i t y. There i s al so a l ot of addi t i onal l i brari es
and add ‐ons from vari ous areas such as cont rol and i dent i fi cat i on of syst em s, neural net works, fuzzy
l ogi c, st at i st i cs and sym bol i c m at h. The m ost i m port ant add ‐on for engi neers i s cert ai nl y Si m uli nk,
whi ch al l ows m odel l i ng, si m ul at i on and anal ysi s of dynam i c syst em s.

Si m uli nk, devel oped by Mat hWorks, i s a graphi cal program m i ng envi ronm ent for model l i ng, si m ul at i ng
and anal ysi ng m ul ti - dom ai n dynam i c syst em s. It s pri m ary i nt erfac e i s a graphi cal bl ock di agram m i ng
t ool and a cust om i sabl e set of bl ock li brari es. It offers ti ght i nt egrat i on wi t h t he rest of t he MATLAB
envi ronm ent and can ei t her dri ve MATLAB or be scri pt ed away from i t . In S im ul i nk, any t ype of
si m ul at i on can be done and t he m odel can be si m ul at ed at any poi nt in t hi s envi ronm ent . Si m uli nk is
wi del y used i n cont rol syst em s and di gi t al si gnal processi ng for m ult i -dom ai n si m ul at i on and m odel -
based desi gni ng.

History
Mat hem at i ci an and P rofessor C l eve Mol er began t o devel op MATLAB i n l at e sevent i es in order t o
si m pl i fy usage of li brari es for num eri cal com put at i on (LINP AC , EISP AC K), whi ch were program m ed
usi ng F OR TR AN program m i ng l anguage. The m ai n advant ages over t he use of li brari es wit hi n
F OR TR AN were sim pl e input and out put of dat a and ari t hm et i c operat i ons on vect ors and m at ri ces as a
whol e. It soon spread t o ot her uni versi t i es and found a st rong audi ence wi t hi n t he appl i ed m at hem at i cs
com m uni t y. The pot ent i al of MATLAB was l at er di scovered by Jack Li t tl e, who founded t he
Mat hWorks C om pany i n 1984 al ong wi t h C l eve Mol er and St eve B angert . The com pany fi rst t ransl at ed
MATLAB from F OR TR AN t o C , updat ed t he user i nt erface, added M ‐fi l es and l i brari es. These
rewri t t en li brari es were known as JAC KP AC .

Why do we use MATLAB?


MATLAB i s wi del y used as a com put at i onal t ool i n sci ence and engi neeri ng encom passi ng the fi el ds of
physi cs, chem i st ry, m at h and al l engi neeri ng st ream s. It i s popul ar because of i t s sim pl i ci t y and fast
cal cul at i ons. S om e of t he basi c feat ures of MATLAB l eadi ng to i t s popul ari t y across t he worl d are:
 It i s a hi gh- l evel l anguage for num eri cal com put at i on, vi sual i zat i on and appl i cat i on
devel opm ent .
 It al so provi des an i nt eract i ve envi ronm ent for i t erat i ve expl orat i on, desi gn and probl em
sol vi ng.
 It provi des vast li brary of m at hem at i cal funct i ons for li near al gebra, st at i st i cs, Fouri er
anal ysi s, fi l t eri ng, opt i m i zat i on, num eri cal int egrat i on and sol vi ng ordi nary di ffer ent i al
equat i ons.
 It provi des bui l t -i n graphi cs for vi sual i zi ng dat a and t ool s for creat i ng cust om pl ot s.
 MATLAB 's program m i ng i nt erfac e gi ves devel opm ent tool s for im provi ng code qual i t y
m ai nt ai nabi l i t y and m axi mi zi ng perform ance.
 It provi des t ool s for bui l di ng appl i cat i ons wi t h cust om graphi cal i nt erfac es.
 It provi des funct i ons for i nt egrat i ng MATLAB based al gori t hms wi t h ext ernal appl i cat i ons and
l anguages such as C , Java, .NET and Mi crosoft Excel .
 Im age processi ng  is t he act of m anagi ng t he pi xel s i n an im age usi ng m at h t echni ques t o
m odi fy the m at ri x val ues. Techni ques such as addi ng t wo m at ri ces t oget her are com m on when
perform i ng i m age processi ng.

5
Study of Simulation of some basic circuits in MATLAB/Simulink environment

Ad van tages of MAT L AB :


1. Ease of u se
MATLAB is an int erpret ed l anguage. The program can be used as a scrat ch pad to eval uat e
expressi ons t yped at t he com m and li ne, or i t can be used t o execut e l arge prewri t t en program s.
P rogram s m ay be easi l y wri t t en and modi fi ed wit h t he bui l t -i n i nt egrat ed devel opm ent
envi ronm ent , and debugged wi t h t he MATLAB debugger. B ecause t he l anguage i s so easy to
use, i t is i deal for educat i onal use and for the rapi d prot ot ypi ng of new program s. Many
program devel opm ent t ool s are provi ded to m ake t he program easy t o use. They i ncl ude an
i nt egrat ed edi t or/ debugger, onli ne docum ent at i on and m anual s, a workshop browser and a l ot of
dem os.
2. Pred efi n ed Fu n cti on s
MATLAB com es com pl et e wi t h an ext ensi ve li brary of predefi ned funct i ons that provi de t est ed
and pre- packaged sol ut i ons t o m any basi c t echni cal t asks. In addi ti on t o t he l arge l i brary of
funct i ons buil t i nt o the basi c MATLAB l anguage, there are m any speci al - purpose tool boxes
avai l abl e to hel p sol ve com pl ex probl em s i n speci fi c areas.
3. Devi ce- Ind ep en d en t Pl otti n g
MATLAB has m any int egral pl ot t i ng and i m agi ng com m ands. The pl ot s and im ages can be
displ ayed on any graphi cal out put devi ce support ed by t he com put er on whi ch MATLAB i s
runni ng. Thi s capabi l i t y m akes MATLAB an out st andi ng tool for visual i si ng t echni cal dat a.
4. G raph i cal User In terface
MATLAB i ncl udes t ool s that al l ow a program t o i nt eract i vel y const ruct a graphi cal user
i nt erfa ce (GUI) for hi s or her program . Wi t h t hi s capabi l i t y, t he program m er can desi gn
sophi st i cat ed dat a anal ysi s program s t hat can be operat ed by rel at i vel y i nexperi enc ed users.
5. In tegrat ed Si mu l in k en vi ron men t
Usi ng a si m ul at i on rat her t han a real - worl d count erpart i s a l ow-cost approach t o t esti ng t hat i s
an essent i al part of any sort of sci ent i fi c or engi neeri ng endeavour today, for t he reasons whi ch
i ncl ude savi ng t im e, enhanci ng t he abi l it y of t he peopl e invol ved t o t ry vari ous sol ut i ons,
reduci ng cost s, im provi ng t he chanc es of a new t echnol ogy succeedi ng and increasi ng the
securi t y surroundi ng a new t echnol ogy

Di sad van tages of MAT L AB :


1. MATLAB i s an i nt erpret ed l anguage and therefo re m ay execut e m ore sl owl y t han com pil ed
l anguages. This probl em can be mi t i gat ed by properl y st ruct uri ng the MATLAB program
2. MATLAB i s very expensi ve.
3. MATLAB i s CP U exhaust i ve soft ware. Therefo re it m ay run very sl owl y on ol d syst em s.

6
Study of Simulation of some basic circuits in MATLAB/Simulink environment

Study of series RLC circuit


Si mu l ati on Di agram

Descri p ti on
A 1kΩ resi st or, 1m H i nduct or and a 2µ F capaci t or are connect ed i n seri es across a 100V AC vol t age
source. To anal yse t he chara ct eri st i cs of t he seri es R LC ci rcui t , vol t age i s m easured i ndi vi dual l y across
di fferent el em ent s and t he current i n t he ci rcui t s al so m easured. The m easurem ent s are fed i nt o ti m e
scope whi ch synt hesi s the graph of t he m easured val ues for a sim ul at i on ti m e of 5s. In t he above
m odel , fol l owi ng bl ocks are used.
 AC Vol tage sou rce: P eak am pli t ude = 100V, frequen cy = 1Hz.
The AC Vol t age Source bl ock im pl em ent s an ideal AC volt age source. The generat ed vol t age U
is descri bed as: U= Asi n (ω t +φ ), where ω =2πf and φ i s phase di fferenc e.
Li brary: F undam ent al Bl ocks/ El ect ri cal S ources.
 Cu rren t Measu remen t:
The Current Measurem ent bl ock is used t o m easure t he i nst ant aneous current fl owi ng in any
el ect ri cal bl ock or connect i on li ne.
Li brary: F undam ent al B locks/ Measurem ent s.
 Vol tage Measu remen t:
The Vol t age Measurem ent bl ock m easures the inst ant aneous vol t age bet ween t wo el ect ri c nodes.
Li brary: F undam ent al Bl ocks/ Measurem ent s.
 S eri es RL C b ran ch : R =1kΩ , L=1m H, C =2µ F .
The S eri es RLC B ranch bl ock im pl em ent s a si ngl e resi st or, i nduct or, or capa ci t or, or a seri es
com bi nat i on of t hese.
Li brary: F undam ent al Bl ocks/ El em ent s.
 Ti me scop e:
The Ti m e S cope bl ock di spl ays si gnal s i n t he t i m e dom ai n. It uses t he si m ul ati on st art ti m e and
st op t i m e t o det erm i ne the defaul t ti m e range.
Li brary: Si nks.
 Powergu i : Mode used: cont i nuous.
The P owergui bl ock opens a graphi cal user i nt erfac e (GUI) that di spl ays st eady- st at e val ues of
m easured current and vol t ages as wel l as al l st at e vari abl es (i nduct or current s and capaci t or
volt ages). It al l ows us t o m odi fy t he i nit i al st at es in order t o st art t he si m ul at i on from any
i ni t i al condi t i ons.
Li brary: F undam ent al Bl ocks(powerl i b)

7
Study of Simulation of some basic circuits in MATLAB/Simulink environment

Si mu l ati on G rap h s

1(a) 1 (b)

1(c) 1(d)

Fi g1. (a) C urrent i n t he ci rcui t . (b) Vol t age across 1kΩ resi st or. (c) Volt age across 1m H induct or.
(d)Vol t age across 2µF capaci t or.

Di scu ssi on
The above graphs are obt ai ned when t he m odel i s si m ul at ed for a ti m e of 5 seconds. It i s observed t hat
t he current and vol t age across t he 1kΩ resi st or are in t he sam e phase, i.e. t he phase di fferenc e bet ween
t he current and vol t age i s zero. In the 1m H i nduct or, the current l ags the vol t age by one-fourt h
wavel engt h, i .e. t he phase di fferenc e bet ween the current and volt age in an i nduct or is one- fourt h of
wavel engt h or π/ 2 rad. In t he 2µ F capaci t or, t he current l eads t he vol t age by one-fourt h wavel engt h,
i .e. t he phase di fferen ce bet ween t he current and vol t age i n a capa ci t or i s π/ 2 rad. Com pari ng t he
volt ages across resi st ance, i nduct or and capaci t or in seri es R LC ci rcui t , it i s found t hat t he volt age
across i nduct or l eads t he vol t age across resi st or by π/ 2rad and t he vol t age across resi st or l eads t he
volt age across t he capaci t or by π/ 2 rad. Overal l the phase di ffer enc e bet ween t he volt ages across t he
i nduct or and t he capaci t or i s π rad. or 180 0 .

8
Study of Simulation of some basic circuits in MATLAB/Simulink environment

Study of parallel RLC circuit


Si mu l ati on d i agram

Descri p ti on
B asi c char act eri st i cs of a paral l el R LC ci rcui t are exam i ned i n t his m odel . A 100Ω resi st or, a 1m H
i nduct or and a 1µ F capaci t or are connect ed across an AC vol t age source havi ng a peak vol t age of
100V. Current s i n di ffer ent branches are m easured by separat e current m easurem ent bl ock and the
si gnal is fed t o t he ti m e scope. The volt age i n al l t he branches is com m on and is m easured by Vol t age
m easurem ent bl ock. It i s t o be not ed t hat t he l one capa ci t or i n paral l el woul d short - ci rcui t t he whol e
AC ci rcui t ; t herefore a 1Ω resi st or is added i n seri es wit h t he capa ci t or t o prevent the short -ci rcui t i ng.

Bl ock s Used
 AC Vol tage sou rce: P eak am pli t ude = 100V, frequen cy = 1Hz.
The AC Vol t age Source bl ock im pl em ent s an ideal AC volt age source. The generat ed vol t age U
is descri bed as: U= Asi n (ω t +φ ), where ω =2πf and φ i s phase di fferenc e.
Li brary: F undam ent al Bl ocks/ El ect ri cal S ources.
 Cu rren t Measu remen t:
The Current Measurem ent bl ock is used t o m easure t he i nst ant aneous current fl owi ng in any
el ect ri cal bl ock or connect i on li ne.
Li brary: F undam ent al B locks/ Measurem ent s.
 Vol tage Measu remen t:
The Vol t age Measurem ent bl ock m easures the inst ant aneous vol t age bet ween t wo el ect ri c nodes.
Li brary: F undam ent al Bl ocks/ Measurem ent s.
 S eri es RL C b ran ch : R 1 =100Ω , L=1m H, C =1µ F i n seri es wi t h R 2 =1Ω .
The S eri es RLC B ranch bl ock im pl em ent s a si ngl e resi st or, i nduct or, or capa ci t or, or a seri es
com bi nat i on of t hese.
Li brary: F undam ent al Bl ocks/ El em ent s.
 Ti me scop e:
The Ti m e S cope bl ock di spl ays si gnal s i n t he t i m e dom ai n. It uses t he si m ul ati on st art ti m e and
st op t i m e t o det erm i ne the defaul t ti m e range.
Li brary: Si nks.
 Powergu i : Si m ul at i on Type: cont i nuous.
The P owergui bl ock opens a graphi cal user i nt erfac e (GUI) that di spl ays st eady- st at e val ues of
m easured current and vol t ages as wel l as al l st at e vari abl es (i nduct or current s and capaci t or
volt ages). It al l ows us t o m odi fy t he i nit i al st at es in order t o st art t he si m ul at i on from any
i ni t i al condi t i ons.
Li brary: F undam ent al Bl ocks (powerl i b)
9
Study of Simulation of some basic circuits in MATLAB/Simulink environment

Si mu l ati on G rap h s

2 (a) 2 (b)

2 (c) 2 (d)

Fi g.2: (a) Vol t age across R, L and C branch. (b) C urrent t hrough 100Ω resi st or. (c) Current through
1m H i nduct or. (d) Current t hrough 1µF capa ci t or.

Di scu ssi on

The paral l el R LC ci rcui t m odel i s si m ul at ed i n t he S im ul i nk envi ronm ent wi t h a si m ul ati on t i m e of 5


second. The above graphs are obt ai ned t hrough t he Ti m e S cope bl ock. In paral l el R LC ci rcui t t he
volt age across each branch is sam e and the branch current s are di fferent . S o t he volt age phasor i s t aken
as t he refe renc e. It i s observed t hat vol t age and current across t he 100Ω resi st or are in t he sam e phase,
i .e. t he phase di fferen ce bet ween t he current and t he vol t age i s zero. In the 1m H induct or, t he current
l ags t he vol t age by one- fourt h wavel engt h, i.e. t he phase di fferen ce bet ween t he current and vol t age i n
an i nduct or i s one- fourt h of wavel engt h or π/ 2 rad. In t he 1µ F capaci t or, t he current l eads t he vol t age
by one- fourt h wavel engt h, i .e. t he phase di fferen ce bet ween the current and vol t age i n a capaci t or i s
π/ 2 rad. Com pari ng t he current s across resi st ance, i nduct or and capaci t or in paral l el R LC ci rcui t , it i s
found that t he current t hrough resi st or l eads t he current t hrough i nduct or by π/ 2rad and the current
t hrough capaci t or l eads t he current t hrough resi st or by π/ 2 rad. Overal l the phase di ffer enc e bet ween
t he current s t hrough capaci t or and i nduct or i s π rad. or 180 0 .

10
Study of Simulation of some basic circuits in MATLAB/Simulink environment

Study of Single-phase Transmission Line


Si mu l ati on Di agram

Descri p ti on
In t hi s model , an AC volt age i s t ransm it t ed to an act i ve load through pi -sect i on l i ne and vari ous t ypes
of power of act i ve l oad are exam i ned usi ng t he t im e scope. The t im e scope shows the pl ot of vol t age
across t he l oad, current t hrough t he load, act i ve power, react i ve power, i nst ant aneous power and P r m s .
Bl ock s Used
 AC Vol tage sou rce: P eak am pli t ude = 100V, frequen cy = 50Hz.
The AC Vol t age Source bl ock im pl em ent s an ideal AC volt age source. The generat ed vol t age U i s
descri bed as: U= Asi n (ω t +φ ), where ω =2πf and φ is phase di fferen ce.
Li brary: F undam ent al Bl ocks/ El ect ri cal S ources
 Pi -secti on L in e: F requency=50 Hz, Li ne l engt h=100km , resi st ance per unit l engt h(r)=0.01273Ω / km ,
Induct ance per uni t l engt h (l ) = 0.9337m H/ km and capa ci t ance per uni t l engt h(c) = 12.74nF / km .
The P I S ect i on Li ne bl ock i m pl em ent s a si ngl e- phase t ransm i ssi on l i ne wi t h param et ers l um ped in
P I sect i ons. For a t ransm i ssi on li ne, the resi st ance, i nduct ance, and capaci t anc e are uni form l y
dist ri but ed al ong the l i ne. An approxi m at e m odel of t he di st ri but ed param et er l i ne is obt ai ned by
cascadi ng several i dent i cal P I sect i ons .
Library: Fundamental Blocks/Elements.
 Cu rren t Measu remen t:
The Current Measurem ent bl ock i s used t o m easure t he i nst ant aneous current fl owi ng i n any
el ect ri cal bl ock or connect i on l i ne.
Li brary: F undam ent al Bl ocks/ Measurem ent s.
 Vol tage Measu remen t:
The Vol t age Measurem ent bl ock m easures the inst ant aneous vol t age bet ween t wo el ect ri c nodes.
Li brary: F undam ent al Bl ocks/ Measurem ent s.
 S eri es RL C b ran ch : R = 100Ω .
The S eri es RLC B ranch bl ock i m pl em ent s a si ngl e resi st or, i nduct or, or capaci t or, or a seri es
com bi nat i on of t hese.
Li brary: F undam ent al Bl ocks/ El em ent s.
 Product:

11
Study of Simulation of some basic circuits in MATLAB/Simulink environment

Multiply and divide scalars and nonscalars or multiply and invert matrices. Library: Math Operations .
 Power: Frequency = 50Hz.
The Power block computes the active power (P), in watts, and the reactive power (Q), in vars, of a voltage-current pair at
fundamental frequency. Library: Fundamental Blocks/Elements.
 RMS:
The RMS block computes the true root mean square (RMS) value of the input signal. 
 Powergu i : Si m ul at i on Type: cont i nuous.

Si mu l ati on G rap h s

F i g3: Graphs of vol t age, current and vari ous t ypes of powers across l oad.
Di scu ssi on
When t he m odel i s si m ul at ed wit h a si m ul at i on t i m e of 0.1 second t he above graphs are pl ot t ed t hrough
ti m e scope. It i s not ed t hat t he power phasor rem ai ns zero for t he fi rst cycl e of source current . It i s so
because t he power bl ock uses a runni ng aver age wi ndow, so one cycl e of si m ul ati on m ust com pl et e
before t he out put gi ves t he correct val ue. F or t he fi rst cycl e t he out put s are kept const ant usi ng t he
val ues speci fi ed by t he i ni ti al input param et ers. It i s observed that the act i ve power deli vered by the
l oad rem ai ns const ant . Act i ve power = 0.5VIcosφ , where φ is t he phase di fferen ce bet ween t he vol t age
and t he current . Here φ =0. Al so act i ve RMS power = V r m s I r m s = 0.5VI i s sam e as act i ve power wit h φ =0.
Al so react i ve power i s approxi m at el y equal t o zero as t he l oad is purel y resi st i ve. S o for purel y
resi st i ve loads, ract i ve power i s equal t o zero. Inst ant aneous power i s gi ven by the product of vol t age

12
Study of Simulation of some basic circuits in MATLAB/Simulink environment

and current at t hat mom ent . Si nce bot h current and vol t age are i n sam e phase, t herefor e t he
i nst ant aneous power i s al ways posi t i ve.

13
Study of Simulation of some basic circuits in MATLAB/Simulink environment

Study of Three-phase Transmission line


Si mu l ati on Di agram

Descri p ti on
In thi s model , a t hree- phase source del i vers power to a three- phase seri es R LC l oad vi a three- phase pi -
sect i on l i ne. A t hree- phase V- I m easurem ent bl ock i s connect ed in bet ween to m easure the vol t age and
current . Then the act i ve power, react i ve power and i nst ant aneous power are com put ed and t he si gnal s
are fed to t he scope where t he si gnal s are represent ed wi t h respect t o ti m e.
Bl ock s Used
 Th ree- Ph ase Sou rce: V r m s =220V, F requency =50Hz, confi gurat i on= Yg.
The Three-Phase Source block implements a balanced three-phase voltage source with internal R-L impedance. The three
voltage sources are connected in Y with a neutral connection that can be internally grounded or made accessible .
Library: Fundam ent al Bl ocks/ El ect ri cal S ources.
 Th ree- Ph ase PI-secti on L in e: Li ne l engt h= 100km , frequency = 50Hz.
The Three-Phase PI Section Line block implements a balanced three-phase transmission line model with parameters lumped
in a PI section. Library: Fundamental Blocks/Elements.
 Th ree- Ph ase V-I Measu rem en t: Vol t age m easurem ent : Phase t o ground.
The Three-Phase V-I Measurement block is used to measure instantaneous three-phase voltages and currents in a circuit.
When connected in series with three-phase elements, it returns the three phase-to-ground or phase-to-phase peak voltages
and currents. Library: Fundamental Blocks/Measurements.
 Three-Phase Series RLC Load: Configuration: Y, fn=50Hz, Vn=220V(p-p), Active Power=10kW,
Inductive Reactive Power= +100VAR, Capacitive Reactive Power= -100VAR.
The Three-Phase Series RLC Load block implements a three-phase balanced load as a series combination of RLC elements.
At the specified frequency, the load exhibits constant impedance. The active and reactive powers absorbed by the load are
proportional to the square of the applied voltage. Library: Fundamental Blocks/Elements.
 Power (3ph , Ph asor):
The Power (3ph, Phasor) block outputs total active power P and reactive power Q of a three-phase voltage-current phasor
signal pair. P and Q are computed as follows: P + jQ =0.5(VaIa* + VbIb* + VcIc*), where I* is complex conjugate of I.
Library: Control and Measurements/Measurements.
 Power (3ph, Instantaneous):
The Power (3ph, Instantaneous) block computes the three-phase instantaneous active power P (in watts) and reactive power
Q (in vars) associated with a periodic set of three-phase voltages and currents.
Library: Control and Measurements/Measurements.
 Powergu i : Si m ul at i on Type: Cont i nuous.
14
Study of Simulation of some basic circuits in MATLAB/Simulink environment

Si mu l ati on G rap h s

F i g4: Vari ous chara ct eri st i c graphs for 3- phase t ransmi ssi on l i ne.

Di scu ssi on
The m odel i s si m ul at ed for a si m ul at i on t i m e of 0.1s and pl ot s of vari ous param et e rs are obt ai ned
t hrough scope. The current and t he volt age are i n sam e phase. I a , I b and I c each have a phase di ffer ence
of 120 0 wi t h each ot her. S im i l arl y V a , V b and V c al so have a phase di fferen ce of 120 0 wi t h each ot her.
Sm al l t ransi ent s are observed in t he i ni ti al st age of Act i ve power pl ot , due t o very sm al l sim ul at i on
ti m e. The m odel t akes som e ti m e t o reach a st eady st at e. S am e probl em is observed wi t h the
i nst ant aneous act i ve power pl ot . It i s al so observed t hat t he react i ve power of t he l oad is zero. Thi s i s
because t he induct i ve and capaci t i ve l oads are equal and thei r react i ve powers are al so equal but
opposi t e i n si gn, thus cancel l i ng out each ot her. The i nst ant aneous react i ve power i s very sm all i n
m agnit ude wi t h increasi ng si nusoi dal nat ure.

15
Study of Simulation of some basic circuits in MATLAB/Simulink environment

Study of electronic meter

Si mu l ati on Di agram

Descri p ti on
Thi s m odel com put es t he unit s of energy consum ed by a varyi ng load al ong a t hree- phase t ransm i ssi on
li ne. The varyi ng l oad i s m odel l ed usi ng t hree di fferent resi st i ve l oads, each cont rol l ed by a ci rcui t
breaker. The si m ul at i on t i m e of 10m i ns is di vi ded i nt o four i nt erval s whi ch are from 0-1m i n, 1-3mi n,
3-6m i n and 6-10m i n. For t he fi rst i nt erval , al l t he ci rcui t breakers are kept open, thus no power i s
del i vered. F or second i nt erval t he fi rst ci rcui t breake r is cl osed and the rest are kept open. Thus i n t he
second int erval onl y the fi rst l oad i s consi dered. F or t he t hi rd i nt erval t he second ci rcui t breaker is
cl osed and the rest are kept open and for the fourt h i nt erval t he t hi rd ci rcui t breaker i s cl osed and the
rest are kept open. The act i ve power is com put ed wit h t he hel p of t he Power (3ph, Phasor) bl ock,
t aki ng t he i nput s from the t hree- phase V-I m easurem ent bl ock. The energy i s com put ed wi t h the hel p of
t he cre at ed MATLAB F unct i on whi ch com put es t he num ber of uni t s of energy for every sam pl e ti m e of
1s. The i ndi vi dual uni t s are t hen added t o gi ve t he t ot al unit s consum ed.

Bl ock s Used
 Th ree- Ph ase Sou rce: V r m s =220V, F requency =50Hz, confi gurat i on= Yg.
The Three- Phase S ource bl ock i m pl em ent s a bal anced t hree- phase vol t age source wi t h int ernal R -L
im pedance. The t hree vol t age sources are connect ed i n Y wi t h a neut ral connect i on t hat can be
i nt ernal l y grounded or m ade accessi bl e .
Li brary : F undam ent al B l ocks/ El ect ri cal Sources.
 T h ree- Ph ase PI-secti on Li n e: Li ne l engt h= 100km , frequen cy = 50Hz.
The Three- Phase P I S ect i on Li ne bl ock im pl em ent s a bal anced t hree- phase t ransm i ssi on l i ne model
wi t h param et ers l um ped in a P I sect i on. Li brary: Fundam ent al Bl ocks/ El em ent s.

16
Study of Simulation of some basic circuits in MATLAB/Simulink environment

 T h ree- Ph ase V- I Measu remen t: Vol t age m easurem ent : P hase to ground.
The Three- Phase V-I Measurem ent bl ock is used to m easure inst ant aneous t hree- phase volt ages and
current s i n a ci rcui t . When connect ed i n seri es wi t h three- phase el em ent s, it ret urns t he t hree
phase- t o-ground or phase- t o-phase peak volt ages and current s.
Li brary: F undam ent al B locks/ Measurem ent s.
 T h ree- Ph ase B reak er: Int ernal cont rol mode.
The Three- Phase B reaker bl ock i m pl em ent s a t hree- phase ci rcui t breaker where t he openi ng and
cl osi ng ti m es can be cont rol l ed ei t her from an ext ernal S i m ul i nk si gnal (ext ernal cont rol m ode), or
from an i nt ernal cont rol ti m er (i nt ernal cont rol m ode). Li brary: F undam ent al B locks/ El em ent s.
Ini ti al st at us: Open.
S wi t chi ng ti m es (s) = [60 180] for CB 1; [180 360] for C B2; [360 600] for C B3.
 T h ree- Ph ase S eri es RL C Load : C onfi gurat i on: Y, f n =50Hz, V n =220V(p- p).
The Three- P hase S eri es R LC Load bl ock i m pl em ent s a t hree- phase bal anced load as a seri es
com bi nat i on of R LC el em ent s. At t he speci fi ed frequency, t he l oad exhi bit s const ant im pedance.
The act i ve and rea ct i ve powers absorbed by t he load are proport i onal t o t he square of t he appl i ed
vol t age. Li brary: F undam ent al B l ocks/ El em ent s.
Load param et e rs: For Load1; act i ve power P = 20kW, react i ve power = 0.
For Load2; act i ve power P = 40kW, react i ve power = 0.
For Load3; act i ve power P = 60kW, react i ve power = 0.
 Power (3ph , Ph asor):
The P ower (3ph, P hasor) bl ock out put s t ot al act i ve power P and react i ve power Q of a t hree- phase
volt age- current phasor si gnal pai r. P and Q are com put ed as fol l ows:
P + j Q =0.5(V a I a * + V b I b * + V c I c * ), where I * i s com pl ex conj ugat e of I.
Li brary: C ont rol and Measurem ent s/ Me asurem ent s.
 Cl ock : Deci m at i on = 10.
The C l ock bl ock out put s the current si m ul at i on t im e at each si m ul at i on st ep. Thi s bl ock i s useful
for ot her bl ocks t hat need t he sim ul at i on t im e. Li brary: S ources.
 Di sp l ay:
Shows val ue of i nput . Li brary: Si nks.
 Memory: Ini ti al Condi ti on: 0.
The Mem ory bl ock hol ds and del ays i t s i nput by one m aj or i nt egrat i on t im e st ep. When pl aced i n an
it erat or subsyst em , i t hol ds and del ays i t s input by one it erat i on. Thi s bl ock accept s cont i nuous and
discret e si gnal s. The bl ock accept s one i nput and generat es one out put . Each si gnal can be scal ar or
vect or. If t he input i s a vect or, t he bl ock hol ds and del ays al l el em ent s of the vect or by the sam e
ti m e st ep. Li brary: Di scret e.
 Add and S ub tract bl ock s:
The S um bl ock perform s addi t i on or subt ract i on on i t s input s. Thi s bl ock can add or subt ract scal ar,
vect or, or m at ri x i nputs. It can al so col l apse t he el em ent s of a si gnal . Li brary: Mat h Operat i ons.
 MAT L AB Fu n cti on :
function y = fcn(P, t)
%#codegen

y = P*t/3600000;
Thi s funct i on t akes t he i nput P and t , and generat es t he out put y. Here y i s the num ber of uni t s of
energy used.
 Ti me S cop e:
The Tim e S cope bl ock di spl ays si gnal s i n the t i m e dom ai n. It uses t he sim ul at i on st art t im e and
st op t i m e t o det erm i ne the defaul t ti m e range.
Li brary: S i nks.
 Powergu i : Si m ul at i on Type: Di scret e; S am pl e Tim e = 1s.
The Powergui bl ock opens a graphi cal user i nt erfa ce (GUI) t hat di spl ays st eady- st at e val ues of
m easured current and vol t ages as wel l as al l st at e vari abl es (i nduct or current s and capaci t or
volt ages). It al l ows us t o modi fy t he ini t i al st at es i n order t o st art t he si m ul at i on from any i ni t i al
condi ti ons.
Li brary: F undam ent al Bl ocks (powerl i b).

17
Study of Simulation of some basic circuits in MATLAB/Simulink environment

Si mu l ati on G rap h

F i g5: P l ot for uni t s of energy used.

Di scu ssi on

Aft er sim ul at i ng t he m odel t he above graph is obt ai ned t hrough t he t im e scope. It can be observed t hat
no uni t i s used duri ng t he fi rst 1 mi n as no l oad is connect ed to t he source. At ti m e t =3m i n and at ti m e
t =6 m i n t here i s change i n t he sl ope of t he pl ot , whi ch suggest s t he changi ng of the l oad. Thus the
present el ect roni c m et er model works successful l y even in t he case of varyi ng load.

18
Study of Simulation of some basic circuits in MATLAB/Simulink environment

Conclusion

The basi cs of MATLAB / Si m ul i nk envi ronm ent was experi enced i n thi s proj ect . It s vari ous advant ages
and di sadvant ages were al so seen. To have a bet t er underst andi ng of t he Si m ul i nk envi ronm ent , som e
basi c ci rcui t s were exam i ned. The ci rcui t s were m odel l ed and si m ul at ed i n t he S im ul i nk envi ronm ent
and t he resul t s were anal ysed and com pared wit h t he t heoret i cal resul t s and expl anat i ons. The
m odell i ng and si m ual t i on part was easi l y accom pl i shed. The resul t s were quit e accurat e and t he pl ot s
were sel f-expl ai ni ng. The envi ronm ent provi des a good i nt erfac e to t he user just li ke t he real worki ng
m odel s. In seri es/ paral l el R LC ci rcui t s, di fferent phasors were com pared usi ng t he pl ot s obt ai ned
t hrough t i m e scope. In t ransm issi on li ne, vari ous powers were anal ysed and in el ect roni c m et er t he
unit s of energy consum ed was cal cul at ed. The model s l i ke t hese provi de a bet t er underst andi ng of
sol ut i on of t he probl em st at em ent s faced.

Overal l MATLAB i s a powerful l soft ware for an engi neer whi ch hel ps i n shapi ng t he i deas for t he
i nnovati ons of a bet t er worki ng m odel and al so in t est i ng and m aki ng an ol d syst em m ore effi ci ent .

19
Study of Simulation of some basic circuits in MATLAB/Simulink environment

Reference
1. Moler, C.: The Origins of MATLAB,
http://www.mathworks.com/company/newsletters/news_notes/clevescorner/dec04.html, 2011‐11‐17
2. Tasner, Tadej, et al. "Comparison of LabVIEW and MATLAB for Scientific research." Annals of the Faculty of
Engineering Hunedoara 10.3 (2012): 389.
3. Dessaint, L-A., et al. "A power system simulation tool based on Simulink." IEEE Transactions on Industrial
Electronics 46.6 (1999): 1252-1254.
4. Lovett, T., et al. "A Multilanguage environment for interactive simulation and development controls for power
electronics." Power Electronics Specialists Conference, 2001. PESC. 2001 IEEE 32nd Annual. Vol. 3. IEEE, 2001.
5. Sybille, Gilbert, et al. "Theory and applications of power system blockset, a MATLAB/Simulink-based simulation tool for
power systems." Power Engineering Society Winter Meeting, 2000. IEEE. Vol. 1. IEEE, 2000.
6. Tyagi, Agam Kumar. MATLAB and SIMULINK for Engineers. Oxford University Press, 2012.
7. Chapman, Stephen J. MATLAB programming for engineers. Nelson Education, 2015.
8. Kalyani, S. Tara, and G. Tulasiram Das. "Simulation of real and reactive power flow control with UPFC connected to a
transmission line." Journal of Theoretical & Applied Information Technology 4.1 (2008).
9. Baloi, Alexandru, Adrian Pana, and Florin Molnar-Matei. "Advantages of Using MatLab Simulink in Laboratory Lessons
on Operating Conditions of Overhead Power Lines." Procedia-Social and Behavioral Sciences 191 (2015): 179-184.
10. Bayindir, Ramazan, Orhan Kaplan, and Celal Can. "C#. NET and MATLAB® based simulation program for basic electrical
circuits." Electrical Machines and Power Electronics and 2011 Electromotion Joint Conference (ACEMP), 2011
International Aegean Conference on. IEEE, 2011.
11. Fares, Dima A., et al. "A learning approach to circuitry problems using MATLAB and PSPICE."  Global Engineering
Education Conference (EDUCON), 2012 IEEE. IEEE, 2012.

20

You might also like