Download presentation
Presentation is loading. Please wait.
Published byAiden Silva Modified over 11 years ago
1
Esercitazione 2
2
1. Definizione del sistema >> A=[-0.2 1; -1 -0.4] A = -0.2000 1.0000 -1.0000 -0.4000 >> B=[0 1]' B = 0 1 >> C=[1 0] C = 1 0 >> D=0 D = 0 >> sistema=ss(A,B,C,D) a = x1 x2 x1 -0.2 1 x2 -1 -0.4 b = u1 x1 0 x2 1 c = x1 x2 y1 1 0 d = u1 y1 0 Continuous-time model.
3
2. Calcolo punti di equilibrio -inv(A)*B*5 ans = 4.6296 0.9259
4
3. Calcolo del movimento >> t=0:0.01:40; >> u=5*ones(1,length(t)); >> [Y,T,X] = lsim(sistema,u,t,[0.1 0.2]'); >> plot(T,X(:,1),T,X(:,2))
5
3. Grafico del movimento e della traiettoria >> plot3(T,X(:,1),X(:,2)) >> plot(X(:,1),X(:,2))
6
3. Calcolo del movimento forzato >> t=0:0.01:40; >> u=5*ones(1,length(t)); >> [Y,T,X] = lsim(sistema,u,t); >> plot(T,X(:,1),T,X(:,2))
7
3. Grafico del movimento forzato e della traiettoria >> plot3(T,X(:,1),X(:,2)) >> plot(X(:,1),X(:,2))
8
3. Calcolo del movimento libero >> t=0:0.01:40; >> u=0*ones(1,length(t)); >> [Y,T,X] = lsim(sistema,u,t,[0.1 0.2]'); >> plot(T,X(:,1),T,X(:,2))
9
3. Grafico del movimento libero e della traiettoria >> plot3(T,X(:,1),X(:,2)) >> plot(X(:,1),X(:,2))
10
3. Movimento, mov. libero, mov. forzato >> t=0:0.01:40; >> u=0*ones(1,length(t)); >> [Y,T,Xlib] = lsim(sistema,u,t,[0.1 0.2]'); >> u=5*ones(1,length(t)); >> [Y,T,Xfor] = lsim(sistema,u,t); >> [Y,T,X] = lsim(sistema,u,t,[0.1 0.2]'); >> plot(T,X,T,Xlib+Xfor)
11
4. Ripetere lesercizio con A1=… >> t=0:0.01:40; >> u=5*ones(1,length(t)); >> [Y,T,X] = lsim(sistema,u,t,[0.1 0.2]'); >> plot(T,X(:,1),T,X(:,2)) >> -inv(A)*B*5 ans = 0 2.5000
12
5. Sistema F=ma >> [Y,T,X] = lsim(sistema,u,t,[0.1 0]'); >> [Y,T,X] = lsim(sistema,u,t,[0.2 0]'); >> [Y,T,X] = lsim(sistema,0*u,t,[0.1 0]'); >> [Y,T,X] = lsim(sistema,0*u,t,[0.2 0]');
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.