Write a Matlab R program that plots the ramp response of the values of the voltage across the capacitor for any arbitrary value between 1 and 10,000 Ohms resistor (R), 0.1 to 3 Henry inductor (L), and capacitor (C) values between 0.000001 and 0.1 Farad of a series resistor, inductor, and capacitor (RLC) circuit. Suggestions 1. Determine the transfer functions H(s) of the series RLC circuit where the output is capacitor voltage. 2. Determine the rational functions defined by the Laplace transform of e(t) = tu(t) multiplied by the transfer functions H(s). 3. The inverse Laplace transform of the above rational functions determines the time domain ramp responses.
MATLAB code is given below in bold letters.
clc;
close all;
clear all;
% define R L and C values
R = 1e3;
L = 1;
C = 10e-6;
% Transfer function from the input voltage to the output
capacitor voltage
s = tf('s');
disp('Transfer function from input voltage to the output capacitor
voltage');
T = minreal(1/(s*C)/(R+L*s+1/(s*C)))
% Now define the laplace transform of the input R(s)
R = 1/s^2;
% Now the output in laplace domain
Y = T*R;
% Now obtain the input response using impulse
command.
figure;impulse(Y);grid on;title('Unit ramp response of the
system');
RESULT:
Transfer function from input voltage to the output capacitor
voltage
Transfer function:
1e005
--------------------
s^2 + 1000 s + 1e005
Unit ramp response is plotted below.
Get Answers For Free
Most questions answered within 1 hours.