[Scilab-users] Consistency in linearization function

classic Classic list List threaded Threaded
1 message Options
André FS André FS
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] Consistency in linearization function

Hello people,

I am not sure if I am doing something wrong but the lin function for linearization of a non-linear function surrounding a given point is returning different results each time I call it. And sometimes the results affects the following calculations I am performing (like root locus, for example). Below I pasted the output of a same linearization call. 

--> [A_body,B_body,C_body,D_body] = lin(sim_f16_body, X0_lin_body, U0); A_body
 A_body  = 

  -0.0209023   0.0519875  -32.14689    0.454861 
  -0.0403812  -1.0077261  -1.17722     456.03564
   0.          0.          0.          1.       
   0.0002606   0.0026867  -0.0006798  -1.0747435


--> [A_body,B_body,C_body,D_body] = lin(sim_f16_body, X0_lin_body, U0); A_body
 A_body  = 

  -0.0201514   0.0538445  -32.14483    0.4545237
  -0.0464131  -1.0221136  -1.1907031   456.02225
   0.          0.          0.          1.       
   0.000417    0.0020722  -0.0011822  -1.0745151


--> [A_body,B_body,C_body,D_body] = lin(sim_f16_body, X0_lin_body, U0); A_body
 A_body  = 

  -0.0195838   0.0528224  -32.148353   0.4557581
  -0.0495045  -1.0029337  -1.1827851   456.02261
  -1.970D-16   0.         -1.203D-16   1.       
   0.0000567   0.0028515  -0.0000533  -1.0754311


--> [A_body,B_body,C_body,D_body] = lin(sim_f16_body, X0_lin_body, U0); A_body
 A_body  = 

  -0.0196784   0.0539473  -32.148072   0.4556623
  -0.050291   -1.0081099  -1.1862481   456.02452
   1.263D-16   0.          0.          1.       
   0.0002898   0.0026783  -0.0003306  -1.075333 

Also, I made an overplot of a simulation using the linear and non-linear systems, as shown below (blue curve is the non-linear system and the green curves are linear system from several lin executions).

image.png
The full code is here [1].

Anyone faced something like that? I'd appreciate any help.


--
André

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users