Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %% Trabalho prático 7
- clear;clc;
- % alínea b
- Km = 10;
- Kg = 0.2;
- Ra = 2;
- La = 2;
- D = 1;
- Jm = 10;
- Jl = 5;
- Jeq = Jl + Jm;
- %variaveis de tempo e frequencia
- fa = 20; %frequencia de amostragem
- V = 10; %tensão aplicada
- ts = 100; %simular durante 100seg
- %ganho
- s = tf('s');
- G=(Km*(60/(2*pi)))/(((Jeq*s)+D)*(La*s+Ra)+(Km*Kg));
- %criar vetor dos tempos e aplicar step
- time = 1:(1/fa):ts;
- step(G*V,time)
- ylabel('Velocity/rpm')
- xlabel('time/s')
- hold on
- % calcular pólos
- %[num,den]=tfdata(G,'v')
- %roots(den)
- %alinea c
- Jeq2=30;
- G2=(Km*(60/(2*pi)))/(((Jeq2*s)+D)*(La*s+Ra)+(Km*Kg));
- step(G2*V,time)
- ylabel('Velocity/rpm')
- xlabel('time/s')
- %alinea d
- for Va = 0.5:0.5:10
- step(G*Va,time)
- hold on
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement