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...
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 question For the circuit given below, find the normal form for the inductor current and capacitor voltage. Use Matlab (...

    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...

  • Solve the question in Matlab and please show Matlab code Consider a double Spring-Mass-Damper System as...

    Solve the question in Matlab and please show Matlab code Consider a double Spring-Mass-Damper System as shown in the figure below: U >F(t) A. Create a Simulink model to simulate the dynamics of the above system for the following parameter values: F(t) = Step input force of magnitude 5 N ml = 7 kg, b1 = 3 Nsec/m, kl = 4 N/m m2 = 3 kg, b2 = 1 Nsec/m, k2= 2 N/m B. Submit a snapshot of the Simulink...

  • Show Matlab plot comparasion properly please 2) Let a system with an LTI model be 100...

    Show Matlab plot comparasion properly please 2) Let a system with an LTI model be 100 G(s) = 2s2 + 24s + 200 a) Determine the zeros, poles, the steady state step response (aka DC gain), the damping ratio, and the natural frequency b) Find the step response of the system manually and plot the y(t) signal on Matlab c) Use Simulink to simulate the same step response and compare both by taking the L2 norm of the error between...

  • 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...

    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 capacitor and inductor at moment t-0 1. Write the dynamic model for RLC circuit after t> 0? a. Show all vour work and calculations b. Write down the characteristic equation of the transfer function...

  • Can someone plz help me??? I would like a website that has to do with guitars...

    Can someone plz help me??? I would like a website that has to do with guitars or something to do with music, someone asked me what kind of website I would like to have and that would be awesome. The attributes to be included, are below. I need a small website that to where I need to interlink a CSS file into the HTML file. I don't know to save the files to have to be able to run with...

  • In matlab, I keep getting the same issue for this problem can someone help? "myrowproduct.m" >> Filename...

    In matlab, I keep getting the same issue for this problem can someone help? "myrowproduct.m" >> Filename myrowproduct (A,x) Undefined function or variable 'Filename' Did you mean: mfilename : myrowproduct (A, x) Undefined function or variable 'myrowproduct' function y = myrowproduct(A,x); function y my rowp roduct (A, x); Error: Function definition not supported in this context. Create functions in code file. (, 2,,)T 4. The product y Ax of an m x n matrix A times a vector x= can...

  • USING MATLAB: Please show how to do this in Matlab a) Create a script file that...

    USING MATLAB: Please show how to do this in Matlab a) Create a script file that uses three sets of nested loops to calculate the final temperature of a light bulb filament. The three nested loops are necessary to calculate Tf for all possible combinations of P, A, and Ti for the engineering formula below. The output from the script should be a 1xn vector representing the values of Tf. You must initialize the output variable so it does not...

  • Please show exactly how it is in MATLAB The cosine function can be evaluated by the...

    Please show exactly how it is in MATLAB The cosine function can be evaluated by the following infinite series: cos ? = 1 − ?^2/ 2! + ?^4/ 4! − ?^6 /6! + ⋯ Create an M-file to compute cos(1.2345 rad) for up to and including eight terms, which is up to the term x^14/14!. a) Your program should compute and display the values of cos ? as each term in the series is added, e.g. cos ? = 1...

  • please help me with this MATLAB CODE and explain to me what each line does and...

    please help me with this MATLAB CODE and explain to me what each line does and what is used for? leave your comments as words, not as pictures. ..................................................................................................................................................................... clear all; close all; % For a script file, you better start with clear all and close all                        % However, for a fucntion, you better NOT to start                        % with them %% End of cell mode example %% Plot function t = 0:0.1:5; x1 = sin(2*5*t); x2 = cos(3*7*t);...

  • MATLAB ONLY!!! PLEASE WRITE IN COMPUTER SO I CAN COPY PASTE!!! ANSWER COMPLETELY, IS ONLY ONE...

    MATLAB ONLY!!! PLEASE WRITE IN COMPUTER SO I CAN COPY PASTE!!! ANSWER COMPLETELY, IS ONLY ONE PROGRAM!!! Body surface Area (Problem 6 Page 249). The body surface area (BSA) in m? of a person (used for determining dosage of medications) can be calculated by the formula (Du Bois formula): BSA = 0.007184 W0.425 H0.75 In which W is the mass in kg and H is the height in cm. Create a GUI to calculate the body surface area (BSA). The...

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