Introduccion Simulink

Páginas: 6 (1449 palabras) Publicado: 22 de noviembre de 2014
7.2. Obtención de modelo matemático
A continuación vamos se realizara un procedimiento por el cual se podra obtener las
matrices de estado un modelo previamente cargado en Simulink.
1- Cargo modelo previamente generado. El modelo debe estar ubicado en el directorio
de trabajo (Current Directory)
Clase_N12_Ejemplo

2- De la librería Source extraigo el elemento In1 y de la librería Sinks elelemento Out1
(en versión 6 de Matlab se encuentran en la librería Señales y Sistemas).

3- Interconecto

4- Guardo los cambios como Clase_N13_Ejemplo
5- Vuelvo a la pantalla de comandos
6- Ejecuto el siguiente comando, para obtener las matrices del sistema generado.
[A,B,C,D]=linmod('Clase_N13_Ejemplo')

Warning: Using a default value of 0.2 for maximum step size. The simulation stepsize
will be limited to be less than this value.
> In dlinmod at 176
In linmod at 54
A=
0 -10 -40
1 0 0
0 -1 -5
B=
10
0
1
C=
0

1

0

D=
0

Obtengo la función de transferencia del sistema completo.
[num,den]=ss2tf(A,B,C,D)
num =
0 -0.0000 10.0000 10.0000

den =
1.0000

5.0000 10.0000 10.0000

printsys(num,den)
num/den =
-6.2172e-015 s^2 + 10 s + 10---------------------------s^3 + 5 s^2 + 10 s + 10
Ejecuto el siguiente comando
help linmod

LINMOD Obtains linear models from systems of ord. diff. equations (ODEs).
[A,B,C,D]=LINMOD('SYS') obtains the state-space linear model of the
system of ordinary differential equations described in the
block diagram 'SYS' when the state variables and inputs are set
to the defaults specified in the block diagram.[A,B,C,D]=LINMOD('SYS',X,U) allows the state vector, X, and
input, U, to be specified. A linear model will then be obtained
at this operating point.
[A,B,C,D]=LINMOD('SYS',X,U,PARA) allows a vector of parameters to
be set. PARA(1) sets the perturbation level (obsolete in R12 unless
using the 'v5' option - see below). For systems that are functions of
time PARA(2) may be set with the thevalue of t at which the linear
model is to be obtained (default t=0). Set PARA(3)=1 to remove extra
states associated with blocks that have no path from input to output.
[A,B,C,D]=LINMOD('SYS',X,U,'v5') uses the full-model-perturbation
algorithm that was found in MATLAB 5.x. The current algorithm
uses pre-programmed linearizations for some blocks, and should be more
accurate in most cases. Thenew algorithm also allows for special
treatment of problematic blocks such as the Transport Delay and
the Quantizer. See the mask dialog of these blocks for more
information and options.
[A,B,C,D]=LINMOD('SYS',X,U,'v5',PARA,XPERT,UPERT) uses the
full-model-perturbation algorithm that was found in MATLAB 5.x.
If XPERT and UPER are not given, PARA(1) will set the perturbation level
accordingto:
XPERT= PARA(1)+1e-3*PARA(1)*ABS(X)
UPERT= PARA(1)+1e-3*PARA(1)*ABS(U)
The default perturbation level is PARA(1)=1e-5.
If vectors XPERT and UPERT are given they will be used as the perturbation
level for the systems states and inputs.
See also: linmodv5, linmod2, dlinmod, trim
Reference page in Help browser
doc linmod
Al pedir la ayuda del comando utilizado previamente para generarlas matrices de
estado, se aprecia que este comando permite no tan solo obtener el modelo matricial,
sino que permitiría linealizar el modelo si este no fuera lineal. En el ejemplo realizado el
modelo era lineal, a continuación se analizara un caso en el que el modelo cargado en
Simulink no lo es.

7.3. Linealización con Simulink
Dadas las siguientes ecuaciones:
e(t) = R*i(t) + L di(t)/dtMdy2/dt2 = Mg – i2(t)/y(t)
Se desea obtener el modelo matemático linealizado, Para ello las ecuaciones antes
mencionadas se pueden representar con el siguiente diagrama en bloque.
e(t)

1/(R+LS)

i(t)

2

()

*

Mdy(t)2/dt2

/

+
Mg

y(t)

1/M

1/S2

El mismo se puede representar en Simulink siguiendo los pasos detallados:
1-Insertar los siguientes bloques:
Bloques...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • INTRODUCCION A SIMULINK
  • introduccion a simulink
  • Introducción Al Matlab Y Simulink
  • Introduccion a MatLab. SIMULINK
  • Simulink
  • Simulink
  • Simulink
  • Simulink

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS