Question
can you show how the model would look like on matlab ? please help with this question
For the circuit given below, find the normal form for the inductor current and capacitor voltage. Use Matlab (Create an.m fil
0 0
Add a comment Improve this question Transcribed image text
Answer #1

144 13 Ar mes cauaaon around loop 1 + 2 リナ 1dí2 --지-12 →th -)지 Loops ar di- 3. 지-클쓸 ใน

MATLAB code is given below in bold letters.

clc;
close all;
clear all;


% define the matrices
A = [-1 -1; 2 -2/3];
B = [1/2;0];
C1 = [1 0]; %This corresponds to inductor current
C2 = [0 1]; %This corresponds to capacitor voltage
D = 0;

% define the system in state space domain
sys1 = ss(A,B,C1,D);
sys2 = ss(A,B,C2,D);

% define the time vector
t = 0:0.01:10;

% define the input
f = exp(-3*t).*cos(2*t);

% compute the system response
y1 = lsim(sys1,f,t); % inductor current
y2 = lsim(sys2,f,t); % capacitor voltage

% plot the indcutor current and capacitor voltage
figure;
subplot(211);
plot(t,y1,'linewidth',2);grid on; xlabel('time');ylabel('Amplitude');
title('inductor current');

subplot(212);
plot(t,y2,'linewidth',2);grid on; xlabel('time');ylabel('Amplitude');
title('capacitor voltage');


inductor current 0.1 0.05 ず0 -0.05 2 4 time capacitor voltage 0.1 r -0.05 2 4 9 10 time

Add a comment
Know the answer?
Add Answer to:
can you show how the model would look like on matlab ? please help with this question For the circuit given below, find the normal form for the inductor current and capacitor voltage. Use Matlab (...
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
  • can you show how the model would look like on matlab ? please help with this...

    can you show how the model would look like on matlab ? please help with this question For the circuit given below, find the normal form for the inductor current and capacitor voltage. Use Matlab (Create an.m file. Use Isim function) and Simulink (Create a Simulink Model). Plot the responses x1 and x2 over time from the M file and Simulink Model. Do they match? Please explain. Use f(t)-e-cos(2t)u(t) for the input. Assume Zero Initial Conditions. 2Ω I H On...

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