Is it possible to calculate time constant and DC gain for RC circuit

8 views (last 30 days)
is it possible to to calculate time constant and DC gain for a given RC circuit?
I have here this matlab code and I want to calculate tau and K. How can I find here tau and K?
I have found this calculator here for tau:
I am not sure if I can calculatetau in this way. Or do I have to set up the transfer function of a RC circuit
to calculate the DC gain?
%% RC - Lowpass Unit Step Response in Time Domain
% Define Parameters
R = 1000; % Resistance in Ohm
C = 0.0001; % Capacitance in Farad
K = ?; % DC gain
tau = ?; % Time constant in s
par_RC_lowpass = [K tau ];
% Calculate Unit Step Response
t = 0:0.01:10* tau; % Time vector in s
y = unit_step_PT1 ( par_RC_lowpass , t);
% Plot Unit Step Response
plot ([0 0 t(end )] ,[0 1 1], 'k--',t,y,'k-')
axis ([t(1) t(end ) min(y) 1.1* max(y)])
h_xlabel = xlabel ({ '$t$ \,/\ ,s'});
set ( h_xlabel ,'Interpreter','latex');
h_ylabel = ylabel ({'$u(t)$\,/\ ,V'});
set ( h_ylabel ,'Interpreter','latex');
grid on

Answers (1)

Mathieu NOE
Mathieu NOE on 14 Jun 2021
a simple RC circuit like the one shown above
has tau = RC and DC gain =1 (assuming Vout = voltage accross C and Vin = voltage accross R + C
this is obvious if you write the electrical equations

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!