Question

MATLAB question. Please answer all the questions and also upload the code by MATLAB. Thanks. Down vote if no code provided.

For the circuit shown above, at the moment t = 0, the switch is closed, find w(t) for 120, No energy is stored in the capacit

0 0
Add a comment Improve this question Transcribed image text
Answer #1

MATLAB code is provided below in bold letters with comments for an explanation with results.

clc;
close all;
clear all;

% step1:
% the dynamic transfer function model is given below.
% deffine the RLC paratemeters
R = 280;
L = 10e-3;
C = 0.9e-6;
Vs = 12;

% define the laplace variable s
s = tf('s');

% characteristic equation is
minreal(R+1/(C*s)+L*s)

result:

0.01 s^2 + 280 s + 1.111e006 =0=> s^2 + 2800s + 1.111*10^8 = 0 is the characteristic equation .

the open loop transfer function is

Transfer function:
1.111e008
-------------------------
s^2 + 28000 s + 1.111e008

Code for obtaining the closed-loop system and the transfer function

% characteristic equation of the closed loop system
% the transfer function of the closed loop system is
T = feedback(G,H)

result:

the closed loop transfer function is
1.111e008 s
-----------------------------------------
s^3 + 28000 s^2 + 1.111e008 s + 1.111e008


The characteristic equation of the closed-loop system is given by

s^3 + 28000 s^2 + 1.111e008 s + 1.111e008 = 0.

Roots of the characteristic equation:

code:

pole(G); % poles of the system are nothing but the roots of the characteristic equation.

result: the roots are given below.

1.0e+004 *

-2.3214
-0.4786

MATLAB code to plot vc(t).

clear s G H;
syms s; % symbolic variables
G = 1/(C*s)/(R+1/(C*s)+L*s);
Vs = 12/s; % input in laplace domain
Vc = Vs*G; % in laplace domain
vc = ilaplace(Vc); % output in time domain.

% define time vector to plot vc
t = 0:1e-4:0.005;
vc = subs(vc); % substitute time in vc(t)

% now plot the time vs vc(t)
figure;
plot(t,vc,'linewidth',2);grid on;xlabel('time');ylabel('Amplitude');title('vc(t)');

result:

3 4 2 0 0 2 6 4 2 0

Add a comment
Know the answer?
Add Answer to:
MATLAB question. Please answer all the questions and also upload the code by MATLAB. Thanks. Down vote if no code provided. For the circuit shown above, at the moment t = 0, the switch is closed, fin...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT