[Scilab-Dev] scilab

Serge Steer Serge.Steer at inria.fr
Thu Oct 11 18:15:58 CEST 2012


Take care that your system is unstable because the some roots of the
denominator have positive real parts.  Consequently the step response diverge.

The solver sends messages about that and finally stops the integration before
the final time.

The csim function really do not take care of such cases. I will fix it
(probabily sending ans error message), but in any case it is not possible to
get correct result simulating a unstable system for a so long time.

//the following instructions work and reveal the divergence.
t=0:0.01:1;//a shorter simulation time
y=csim('step',t,syslin('c',numerador/denominador));
plot(t,y)


Le 11/10/2012 00:39, Gledson Melotti a écrit :
> Hi, deculpa me the hassle. I gostari to simulate a transfer function 
> in SCILAB (as the commands below), but I can not because scilab 
> provides several errors. Could you tell me what I should do to get 
> simulate the transfer function.
> s=poly(0,'s');
> funcprot(0);
>
> num=x_dialog('numerador','s^5*kd+s^4*(60*kd+kp)+s^3*(1500*kd-60*kp+ki)+s^2*(-15000*kd+1500*kp-60*ki)+s*(-15000*kp+1500*ki)-15000*ki')
> den=x_dialog('denominador','s^5*(kd)+s^4*(-1-60*kd+kp)+s^3*(-1500-60+1500*kd-60*kp+ki)+s^2*(-15000-1500-15000*kd+1500*kp-60*ki)+s*(-15000-15000*kp+1500*ki)-15000*ki')
> kp=96.770532;
> ki=42.568724 ;
> kd=18.711118;
>
> t=0:0.01:100;
> numerador=evstr(num);
> denominador=evstr(den);
>
> y=csim('step',t,numerador/denominador)
> I thank you for your attention,
>
> Gledson Melotti.
>
>
> _______________________________________________
> dev mailing list
> dev at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/dev/attachments/20121011/52f144f7/attachment.htm>


More information about the dev mailing list