Вы находитесь на странице: 1из 1

clc;

clear all;
R=input('Enter the value of Resistance:');
L=input('Enter the value of Inductance:');
C=input('Enter the value of Capacitance:');
disp('Damping Ratio:');
z=(R/2)*sqrt(C/L);
disp('Natural Frequency:');
wn=sqrt(1/(L*C));
if z<1
disp('Under damping:');
elseif z=1
disp('Critical damping:');
elseif z=0
disp('Undamping:');
else
disp('Overdamping');
end
if z<1
disp('Attenuation frequency');
q=z*wn
disp('damping angle');
theta=acos(z)
disp('damping frequency');
wd=wn*sin(theta)
disp('Rise time');
tr=(pi-theta)/wd
disp('Peak time');
tp=pi/wd
disp('Maximum Peak Overshoot');
Mp=exp(-pi/tan(theta))
disp('Time constant');
T=1/q
disp('Settling time');
ts=3*T
end
disp('Transfer function of the system');
sys=tf(wn^2,[1 2*q wn^2])
step(sys);

Вам также может понравиться