моделирование / lab4
.docxЦуканов ИВТ-43
Задание 1
syms x
eq = 1 - (exp(-0.002*x)*cos(0.099*x) + 0.02*exp(-0.002*x)*sin(0.099*x));
n = 0:0.1:2000;
S1 = subs(eq, x, n);
figure(1)
hold on
plot(n, S1)
line([0 2000],[1 1]);
line([0 2000],[0.95 0.95],'Color','red','LineStyle','--');
line([0 2000],[1.05 1.05],'Color','green','LineStyle','--');
xlabel('t');
ylabel('h(t)');
Задание 2
clc, clear
Wp = @(p) 10 ./ (p.^2 + 0.4 .* p + 11);
syms j
Wij = Wp(1i .* j)
U = real(Wij)
V = imag(Wij)
figure(1)
hold on, grid on
xlabel('w'), ylabel('A')
A = sqrt(U^2 + V^2)
w = 0:0.01:10;
plot(w, subs(A, w))
figure(2)
f=tf([10],[1 0.4 11])
bode(f)
Задание 3
clc, clear
syms s t
k = 6;
T = 1.2;
T1 = 1.2;
T2 = 0.08;
ks = 0.06;
Wp = k*s / ((T1*s+1) * (T2^2*s^2 + 2*T2*ks*s + 1))
ht = ilaplace(Wp/s)
limit(ht)
n = 0:0.01:10;
S1 = subs(ht, t, n);
figure(1)
hold on
plot(n, S1)
line([0 10],[0 0]);
line([0 10],[-0.05 -0.05],'Color','red','LineStyle','--');
line([0 10],[0.05 0.05],'Color','green','LineStyle','--');
xlabel('t');
ylabel('h(t)');