labo3
-
Upload
stevend-meza-rodriguez -
Category
Documents
-
view
215 -
download
0
description
Transcript of labo3
-
LABORATORIO N3 DE CONTROL DIGITAL
Obencin de la funcion de transferencia de un motor DC
Ahora procederemos a encontrar la funcion de transferencia del motor DC para esto l analizaremos matematicamente:
Las siguientes variables son las siguientes: Datos del fabricante que se conoce:
Va Voltaje de armadura(V)
Ra Resistencia de la armadura ()
La Inductancia de la armadura (H)
Ia Corriente de la armadura (I)
Eb Voltaje de entrada (v)
w Velocidad angular (rad/s)
Tm Torque del motor(Nm)
Posicin angular del rotor (rad) Jm Inercia del rotor (Kgm2)
Bm Coeficiente de friccin viscosidad(Nms/rad)
Kt Constante del torque(Nm/A)
Kb Constante de fme (Vs/rad)
-
Aplicando las ecuaciones en el circuito por medio de tensiones de lazo tenemos:
Aplicando transformada de laplace a las dos ecuaciones tenemos que:
Si se despeja la corriente de armadura de la ecuacin segunda y por medio de trucos matemticos podemos obtener que:
Donde la relacin del rotor y la velocidad cuando se aplica un voltaje da como funcin de transferencia la siguiente:
Donde la relacin entre posicin y velocidad del motor dc es la siguiente:
-
Funcin de transferencia del motor dc (Parte experimental).
Como no todos los motores en dc tiene las mismas caractersticas se realizo una proceso en un motor dcde 12 voltios el cual se tomaron diferentes datos por medio de la tarjeta de adquisicin Arduino loscuales procesados en Matlab por medio de IDENT podemos obtener la funcin de transferencia del motor. Observacin: es recomendable hacer este proceso para todos los motores dc que se utilicen paracualquier tipo de control .
Cdigo Arduino:
-
Cdigo en Matlab:
% Captura de voltaje en tiempo real con Arduino% Jorge Garca Tscar %% Apertura del serie (COM)close all; clear all; clc%borrar previosdelete(instrfind({'Port'},{'/dev/ttyS101'}));%crear objeto series = serial('/dev/ttyS101','BaudRate',9600,'Terminator','CR/LF');warning('off','MATLAB:serial:fscanf:unsuccessfulRead');%abrir puertofopen(s); %% Preparar medida % parmetros de medidastmax = 10; % tiempo de captura en srate = 33; % resultado experimental (comprobar) % preparar la figuraf = figure('Name','Captura');a = axes('XLim',[0 tmax],'YLim',[0 5.1]);l1 = line(nan,nan,'Color','r','LineWidth',2);l2 = line(nan,nan,'Color','b','LineWidth',2); xlabel('Tiempo (s)')ylabel('Voltaje (V)')%title('Captura de voltaje en tiempo real con Arduino')grid onhold on %% Bucle% inicializarv1 = zeros(1,tmax*rate);v2 = zeros(1,tmax*rate);i = 1;t = 0; % ejecutar bucle cronometradoticwhile t
-
% resultado del cronometroclc;fprintf('%g s de captura a %g cap/s \n',t,i/t); %% Tratamiento % salvar el grfico% necesita la funcin externa savefigure:% http://www.mathworks.de/matlabcentral/% fileexchange/6854-savefigure%savefigure('captura_multi','s',[4.5 3],'po','-dpdf') %% Limpiar la escena del crimen fclose(s);delete(s);clear s
Ahora obtenemos datos de Matlab, esto nos genera la siguiente adquisicin de datos:
>> v1
v1 =
Columns 1 through 9
0 0 0 0 0 0 0 0 0
Columns 10 through 18
0 0 0.0732 0 0 0 0 0 0
Columns 19 through 27
0 0 0 0 0 0 0 0 0
Columns 28 through 36
0 0 0 0 0 0 0 0 0
Columns 37 through 45
0 0 0 0 0.0049 0 0 0 0
Columns 46 through 54
0 0 0 0 0 0 0.0293 0 0
Columns 55 through 63
-
0 0 0 0 0 0 0 0 0
Columns 64 through 72
0 0 0 0 0 0.0049 0 0 0
Columns 73 through 81
0 0 0 0 0 2.4072 2.5977 3.8135 3.8623
Columns 82 through 90
3.9551 3.9795 3.9941 3.9893 3.9893 3.9941 3.9990 3.9893 3.9746
Columns 91 through 99
3.9307 3.9307 3.9355 3.9307 3.9502 3.9502 3.9795 3.9600 3.9697
Columns 100 through 108
3.9502 3.9600 3.9844 3.9746 3.9795 3.8672 3.9453 4.0332 3.9746
Columns 109 through 117
4.0576 3.9941 3.9697 3.8818 3.8574 3.9795 4.0137 3.9941 3.9844
Columns 118 through 126
3.9844 3.9893 3.9795 3.9648 3.9404 3.9648 4.0186 3.9844 3.9746
Columns 127 through 135
3.9600 3.9600 3.9453 3.9697 3.9551 3.9746 4.0723 3.9697 3.8818
Columns 136 through 144
3.9941 3.9990 3.9893 3.9746 3.9795 3.9746 3.9844 3.9697 3.9600
Columns 145 through 153
4.0918 3.9795 3.9844 3.9697 3.9893 3.9795 3.9844 3.9844 3.9941
Columns 154 through 162
3.9795 3.9453 4.0381 3.9746 3.9697 3.9697 3.9941 3.9795 3.9697
Columns 163 through 171
-
3.9746 3.9746 4.0771 3.9795 3.9600 3.9795 3.9893 3.9648 3.9795
Columns 172 through 180
3.9795 4.0723 3.9648 3.9697 3.9893 4.0039 3.9697 3.9941 3.9648
Columns 181 through 189
3.9746 3.9990 3.9746 3.9941 3.9893 3.9844 3.9600 3.9795 3.9697
Columns 190 through 198
3.9844 3.9990 3.9795 3.9795 3.9795 3.9551 3.9697 3.9648 4.0039
Columns 199 through 207
3.9844 3.9893 3.9746 4.0918 4.0039 3.9844 3.9844 3.9746 3.9746
Columns 208 through 216
3.9795 3.9844 3.9746 3.9502 3.9746 4.0918 3.9648 3.9990 3.9795
Columns 217 through 225
4.0918 3.9600 3.9746 3.9746 3.9941 4.0527 3.9844 3.9746 3.9648
Columns 226 through 234
3.9551 3.9844 3.9893 4.0088 3.9844 3.9795 3.9453 3.9844 3.9746
Columns 235 through 243
3.9648 3.9844 3.9453 3.9795 3.9746 3.9746 3.9648 3.9941 4.0039
Columns 244 through 252
3.9941 3.9893 3.9648 3.9941 3.9697 3.9697 3.9795 3.9502 3.9502
Columns 253 through 261
3.9844 3.9648 3.9697 3.9551 3.9648 3.9600 3.9990 4.0088 3.9893
Columns 262 through 270
3.9648 3.9844 3.9746 3.9746 3.9844 3.9844 3.9844 3.9844 3.9648
Columns 271 through 279
-
3.8867 4.0137 3.9844 4.0039 3.9844 4.0967 3.9893 3.9844 3.9746
Columns 280 through 288
3.9844 3.9844 4.0967 4.1553 3.9648 3.9746 3.9551 3.9746 3.9844
Columns 289 through 297
3.9844 3.9893 3.9844 3.9746 3.9746 3.9600 4.0918 3.9551 3.9893
Columns 298 through 306
3.9746 3.9795 3.9648 3.9600 3.9746 3.9844 3.9844 4.0430 3.9844
Columns 307 through 315
3.9355 3.9648 3.9697 3.9844 3.9746 3.9795 3.9844 3.9648 3.9648
Columns 316 through 324
3.9502 3.9697 3.9893 3.9844 3.9795 3.9600 3.9844 3.9551 3.9648
Columns 325 through 333
3.9746 3.9893 3.9795 3.9795 3.9648 3.9844 3.9404 4.0869 3.9648
Columns 334 through 342
3.9648 3.9844 3.9551 4.0625 3.9844 3.9697 3.9697 3.9648 3.9746
Columns 343 through 351
3.9648 3.9697 3.9697 3.9697 3.9746 3.9795 3.9746 3.9697 3.9697
Columns 352 through 360
3.9453 3.9648 3.9697 3.9795 3.9795 3.9746 3.9795 3.9648 3.9746
Columns 361 through 369
3.9648 3.9697 3.9697 3.9844 3.9746 3.9746 3.9502 3.9600 3.9844
Columns 370 through 378
3.9893 3.9893 4.0234 3.9746 3.9697 3.9746 3.9746 3.9307 3.9697
Columns 379 through 387
-
3.9844 3.9697 3.9697 3.9648 3.9648 3.9600 3.9941 3.9648 3.9844
Columns 388 through 396
3.9697 3.9600 3.9746 3.9551 3.9795 3.9795 3.9648 3.9746 3.9844
Columns 397 through 405
3.9795 3.9600 3.9795 3.9844 3.9795 3.9844 3.9795 3.9746 3.9600
Columns 406 through 414
3.9648 3.9014 3.9844 3.9795 3.9844 3.9648 3.9600 3.9551 3.9697
Columns 415 through 423
3.9844 3.9746 3.9697 3.9648 3.9746 3.9551 3.9844 3.9746 3.9795
Columns 424 through 430
3.9795 3.9453 3.9600 3.9648 3.9600 3.9844 3.9795
Ahora veremos el ploteo obtenido:
-
Tomamos mas datos:
-
Pasamos lo obtenido a IDENT:
Obtenemos la siguiente funcion de transferencia:
>> tf1
tf1 = From input "u1" to output "y1": 6.019e-05 ---------------------------- s^2 + 0.004007 s + 0.0001288 Name: tf1Continuous-time identified transfer function.
Parameterization: Number of poles: 2 Number of zeros: 0 Number of free coefficients: 3 Use "tfdata", "getpvec", "getcov" for parameters and their uncertainties.
Status: Estimated using TFEST on time domain data "mydata4".Fit to estimation data: 59.2% (simulation focus) FPE: 0.396, MSE: 0.3879
-
Obtenemos nuevamente datos:
Graficamos la funcin de transferencia:
-
Ahora obteniendo un modelo de motor aceptable procedemos a hallar los parametros del motor:
6.019e-05 ---------------------------- s^2 + 0.004007 s + 0.0001288
Arreglando la funcion de transferencia nos queda:
De lo cual podemos obtener los siguientes parametros igualando ambas expresiones:
CONCLUSIONES.-
Al obtener la funcin de transferencia del motor ya podemos aplicarle algun controlador para aplicar un control dado.
Se puede mejorar en comportamiento de la planta si agregaramos compensadores.
Si bien nosotros trabajamos con un conversor de frecuencia a voltaje, se pudo trabajar directamente con los encoder para un control de posicion.