Question: This script determines the initial zero crossing of the % underdamped response of a parallel RLC circuit. The % underdamped response is: % v (
This script determines the initial zero crossing of the
underdamped response of a parallel RLC circuit. The
underdamped response is:
vtexptRCAcossqrtLCRCt
BsinsqrtLCRCt
The circuit component values and initial conditions
are:
R ohms; Le henry; Ce farads;
A volt, B volt
Solve over the interval t e sec
clear; clc;
R; Le; Ce; A; B;
fprintfExample : Find first zero crossing of ;
fprintfunderdamped RLC circuit
;
tmin; tmaxe;
split up timespan into intervals:
N;
dttmaxtminN;
First, calculate t and vt at each timestep
for n:N
tn tminndt;
vn funcRLCtnABRLC;
fprintfe f
tnvn;
end
plottv xlabelt ylabelv
titlev vs t for a RLC circuit' grid;
Next, use the search method to find the first timestep
where the sign of vt changes. When found, use fzero
to solve.
for n:N
sign vnvn;
if sign
rootintervaltn;
rootintervaltn;
Solve for the zero of the multiargument
function funcRLCm by invoking funcRLC as an
anonymous function of one variable.
root fzero@t funcRLCtABRLC
rootinterval;
break;
end
end
fprintf
;
if n N
fprintfFirst zero crossing is at te s
root;
else
fprintfNo roots lie within g t g s
tmin,tmax;
end
Check solution. Putting root into funcRLC should
produce zero.
v funcRLCrootABRLC;
fprintfve
v;
funcRLCm
This function works with Examplem
function vfuncRLCtABRLC
argRC;
argsqrtLCRC;
Equation :
vexpargtAcosargtBsinargt;
Look at the above programme and find out what is wrong. Discuss as
students and correct if necessary.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
