Skip to content

Instantly share code, notes, and snippets.

@arthurafarias
Created April 7, 2016 19:29
Show Gist options
  • Save arthurafarias/7e9ecda666e4455f348eec53da67a43a to your computer and use it in GitHub Desktop.
Save arthurafarias/7e9ecda666e4455f348eec53da67a43a to your computer and use it in GitHub Desktop.
Laboratório de Controle Analógico Experimento 03 Parte 02 (Código Matlab)
Jm = 1.5;
Ra = 60e-3;
La = 1.8e-3;
Ke = 0.8;
Fm = 0.01;
oe = 1;
Ka = (Ke*oe)/(Ke^2*oe^2+Ra*Fm);
Km = (Ra)/(Ke^2^oe^2 + Ra*Fm);
Ta = La/Ra;
Tm = Jm/Fm;
Den = ((1)/(Ta*Tm)) + ((Ke^2^oe^2)/(La*Jm));
Kv = (Ke*oe)/(Den*Jm*La);
Kc = (1)/(Den*Jm*Ta);
A = [-Ra/La -Ke*oe/La; Ke*oe/Jm -Fm/Jm];
B = [1/La 0; 0 -1/Jm];
C = eye(size(A));
D = zeros(size(A));
sys = ss(A,B,C,D);
[b,a]= ss2tf(A,B,C,D,1);
num11 = b(1,:);
den11 = a;
num21 = b(2,:);
den21 = a;
[b,a]= ss2tf(A,B,C,D,2);
num12 = b(1,:);
den12 = a;
num22 = b(2,:);
den22 = a;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment