0% found this document useful (0 votes)
187 views15 pages

MATLAB Control System Analysis

The document defines matrices A, B, and C and performs controlability and observability analyses. It then calculates the characteristic equation and eigenvectors of A, and uses these to determine controller and observer gains K and Ke to achieve a desired closed-loop system response. Various warnings are displayed regarding default solver settings.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
187 views15 pages

MATLAB Control System Analysis

The document defines matrices A, B, and C and performs controlability and observability analyses. It then calculates the characteristic equation and eigenvectors of A, and uses these to determine controller and observer gains K and Ke to achieve a desired closed-loop system response. Various warnings are displayed regarding default solver settings.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

>> A=[-0.002 -1.4 9.8 ; -0.01 -0.

04 0 ;0 1 2]

A=

-0.0020 -1.4000

9.8000

-0.0100 -0.0400

1.0000

2.0000

>> B=[9.8;6.3;1]

B=

9.8000
6.3000
1.0000

>> C=[0 0 1]

C=

>> Matriz_Controlabilidad=ctrl(A,B)
Undefined function 'ctrl' for input arguments of type 'double'.

>> Matriz_Controlabilidad=ctrb(A,B)

Matriz_Controlabilidad =

9.8000

0.9604 81.8281

6.3000 -0.3500
1.0000

0.0044

8.3000 16.2500

>> Matriz_Observabilidad=obsv(A,C)

Matriz_Observabilidad =

1.0000

-0.0100

1.0000
2.0000

1.9600

4.0000

>> Ecuacion_Caracteristica=poly(A)

Ecuacion_Caracteristica =

1.0000 -1.9580 -0.0979

0.1258

>> W=[-0.0979 -1.9580 1; -1.9580 1 0;1 0 0]

W=

-0.0979 -1.9580
-1.9580

1.0000

1.0000

1.0000
0
0

>> Matriz_T=M*W
Undefined function or variable 'M'.

>> Matriz_T=Matriz_Observabilidad*W

Matriz_T =

1.0000

0.0420

1.0000

0.1633

1.9796 -0.0100

>> K_Poly_Deseado=([-2 -2 -20])

K_Poly_Deseado =

-2

-2 -20

>> K_Poly_Deseado=poly([-2 -2 -20])

K_Poly_Deseado =

24

84

80

>> Ke_Poly_Deseado = poly([-20 -20 -60])

Ke_Poly_Deseado =

100

2800

24000

>> K_Testada=[80-0.1258 84+0.0979 24+1.9580]

K_Testada =

79.8742 84.0979 25.9580

>> K=inv(Matriz_T)*K_Testada
Error using *
Inner matrix dimensions must agree.

>> K=K_Testada*inv(Matriz_T)

K=

1.0e+03 *

0.2844

5.2227 -2.5958

>> Ke_Testada=[24000-0.1258 2800+0.0979 100+1.958]

Ke_Testada =

1.0e+04 *

2.4000

0.2800

0.0102

>> Matriz_Q=inv(W*N')
Undefined function or variable 'N'.

>> Matriz_Q=inv(W*Matriz_Observabilidad')

Matriz_Q =

1.0000 -0.0420

8.0157

1.0000 197.9580

0 -100.0000

>> Ke_Testada=Ke_Testada'

Ke_Testada =

1.0e+04 *

2.4000
0.2800
0.0102

>> Ke=Matriz_Q*Ke_Testada

Ke =

1.0e+04 *

2.4700
2.2983
-1.0196

Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting

'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics


page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting

'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics


page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting

'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics


page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting

'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics


page of
the configuration parameters dialog
Error using simscope (line 524)
Invalid Simulink object handle

Error while evaluating figure CloseRequestFcn

Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of

the configuration parameters dialog


Warning: Using a default value of 0.1 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
Error using Simulink.scopes.Util>get_block_param (line 4983)
Invalid Simulink object handle

Error in Simulink.scopes.Util.BufferInUse (line 2001)


bufferInUse = ~((strcmp(get_block_param(block, 'LimitDataPoints'),
'on')) &&
...

Error in Simulink.scopes.Util.SimulationTerminate (line 2016)


bufferInUse = Simulink.scopes.Util.BufferInUse(block);

Error in simscope (line 393)


[scopeUserData,modified] =
Simulink.scopes.Util.SimulationTerminate ...

Error in simscope>simulinkstepper (line 881)


simscope('StepSimulation',scopeFig);

Warning: Error occurred while evaluating listener callback.


Warning: Using a default value of 0.1 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of

the configuration parameters dialog


Warning: Using a default value of 0.05 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
Warning: Using a default value of 0.01 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
>> eig(A)

ans =

-0.2612
0.2439
1.9753

Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting

'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics


page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting

'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics


page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting

'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics


page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
Error using simscope (line 524)
Invalid Simulink object handle

Error while evaluating figure CloseRequestFcn

Error using simscope (line 524)


Invalid Simulink object handle

Error while evaluating figure CloseRequestFcn

Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of

the configuration parameters dialog


Warning: Input port 1 of 'Examen_Simulink/Mux' is not connected.
Warning: Input port 1 of 'Examen_Simulink/Mux' is not connected.
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
Warning: Using a default value of 0.2 for maximum step size. The simulation
step size
will be equal to or less than this value. You can disable this diagnostic by
setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics
page of
the configuration parameters dialog
>>

You might also like