Re: [Scilab-users] Model ID of First order delay and Dead Time Process

2016-03-12 Thread Tim Wescott
If you're going to be doing this often it may be profitable to get a
book on system identification.  I can't be sure because I haven't had to
do it, but I'm pretty sure that system identification with time delay is
an indirect enough process that there will be multiple ways to do it,
each one being good in some particular set of circumstances.

On Sat, 2016-03-12 at 06:39 -0700, noguchi wrote:
> Dear Mr.Serge, 
> 
> 
> Thank you for your advise.
> 
> I didn't know that step should start from the beginning.
> 
> If there is a scilab tool to identify transport delay and continuous time
> transfer functions (Fist order delay, scond order delay, integral), it would
> be nice.
> 
> 
> Thanks.
> 
> 
> Y. Noguchi
> 
> 
> 
> --
> View this message in context: 
> http://mailinglists.scilab.org/Model-ID-of-First-order-delay-and-Dead-Time-Process-tp4033659p4033709.html
> Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
> Nabble.com.
> ___
> users mailing list
> users@lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
> 
> 

-- 

Tim Wescott
www.wescottdesign.com
Control & Communications systems, circuit & software design.
Phone: 503.631.7815
Cell:  503.349.8432


___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] ?= creating ROI from mouse click

2016-03-12 Thread Philipp Mühlmann
to end this topic:

many thanks to the authors of the Matlab / Octave compatiblity toolbox

Their function moc_inpolygon is doing the same thing, but way faster.



2016-03-12 13:20 GMT+01:00 Philipp Mühlmann :

> @ Samuel,
>
> thanks for the link.
>
> This is a nice function and it is doing what I am searching for.
>
> My example is rather slow though and I don't think that it is handy if one
> deals with big 2D Arrays.
>
> For a 640 x 512 array it took me 55 seconds to get the mask.
>
> guess the two for loops are the reason.
>
> clc;tic()
> img = rand(512,614).*255;
> rows = size(img,'r');cols = size(img,'c');
> mask = zeros(img);xpol = [];ypol = [];ibutton = 3;nr_points = 0;
> f=figure();f.color_map=graycolormap(255);Matplot(img);
> while ibutton == 3;
> [ibutton,xcoord,ycoord]=xclick();
> if ibutton ==3
> nr_points = nr_points + 1;
> plot(xcoord,ycoord,'o');
> xpol(nr_points) = xcoord;
> ypol(nr_points) = rows-ycoord;
> end;enddelete(gcf());
> for i = 1:rows;
> for j = 1:cols
> inside = point_in_polygon(xpol, ypol, j, i) ;
> if inside == %t;
> mask(i,j) = 1;
> end;
> endend
> f = 
> figure();f.color_map=graycolormap(255);Matplot(img.*mask);plot(xpol,rows-ypol,'o');
> t = toc()disp(t);
>
>
>
>
>
>
>
>
> 2016-03-12 1:02 GMT+01:00 Samuel Gougeon :
>
>> Le 12/03/2016 00:42, Samuel Gougeon a écrit :
>>
>> .../...
>>
>> This ends the selection part.
>>
>> After that, identifying points of your grayplot area being in the curve
>> may be done with
>> point_in_polygon: https://fileexchange.scilab.org/toolboxes/121000
>> However, this script is not vectorized. So, if your full area has big
>> sizes, it may takes a while.
>>
>> I would not guaranty that point_in_polygon() can be vectorized, but we
>> may try to.
>> It does not look too bad, at first sight :)
>>
>> .
>> Actually, its vectorization is straightforward (to process a matrix of
>> points without explicit "for" loop,
>> instead of a unique point). But the script has other problems.
>> Special cases (horizontal segments, points on segments, etc) are not
>> really handled.
>> Nevertheless, you may give it a try as is. Or improve it for special
>> cases.
>>
>> Samuel
>>
>>
>> ___
>> users mailing list
>> users@lists.scilab.org
>> http://lists.scilab.org/mailman/listinfo/users
>>
>>
>
>
> --
> There we have the salad.
>



-- 
There we have the salad.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Do I have the C compiler?

2016-03-12 Thread Samuel Gougeon

Le 12/03/2016 21:08, Vittorio Comino a écrit :

.../...

Can anybody please help me to get a C compiler working in Scilab?

.
You may add a comment here:Add a way to declare explicitly the path to a 
C compiler 


SG


___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Model ID of First order delay and Dead Time Process

2016-03-12 Thread noguchi
Dear Mr.Serge, 


Thank you for your advise.

I didn't know that step should start from the beginning.

If there is a scilab tool to identify transport delay and continuous time
transfer functions (Fist order delay, scond order delay, integral), it would
be nice.


Thanks.


Y. Noguchi



--
View this message in context: 
http://mailinglists.scilab.org/Model-ID-of-First-order-delay-and-Dead-Time-Process-tp4033659p4033709.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] ?= creating ROI from mouse click

2016-03-12 Thread Philipp Mühlmann
@ Samuel,

thanks for the link.

This is a nice function and it is doing what I am searching for.

My example is rather slow though and I don't think that it is handy if one
deals with big 2D Arrays.

For a 640 x 512 array it took me 55 seconds to get the mask.

guess the two for loops are the reason.

clc;tic()
img = rand(512,614).*255;
rows = size(img,'r');cols = size(img,'c');
mask = zeros(img);xpol = [];ypol = [];ibutton = 3;nr_points = 0;
f=figure();f.color_map=graycolormap(255);Matplot(img);
while ibutton == 3;
[ibutton,xcoord,ycoord]=xclick();
if ibutton ==3
nr_points = nr_points + 1;
plot(xcoord,ycoord,'o');
xpol(nr_points) = xcoord;
ypol(nr_points) = rows-ycoord;
end;enddelete(gcf());
for i = 1:rows;
for j = 1:cols
inside = point_in_polygon(xpol, ypol, j, i) ;
if inside == %t;
mask(i,j) = 1;
end;
endend
f = 
figure();f.color_map=graycolormap(255);Matplot(img.*mask);plot(xpol,rows-ypol,'o');
t = toc()disp(t);








2016-03-12 1:02 GMT+01:00 Samuel Gougeon :

> Le 12/03/2016 00:42, Samuel Gougeon a écrit :
>
> .../...
>
> This ends the selection part.
>
> After that, identifying points of your grayplot area being in the curve
> may be done with
> point_in_polygon: https://fileexchange.scilab.org/toolboxes/121000
> However, this script is not vectorized. So, if your full area has big
> sizes, it may takes a while.
>
> I would not guaranty that point_in_polygon() can be vectorized, but we may
> try to.
> It does not look too bad, at first sight :)
>
> .
> Actually, its vectorization is straightforward (to process a matrix of
> points without explicit "for" loop,
> instead of a unique point). But the script has other problems.
> Special cases (horizontal segments, points on segments, etc) are not
> really handled.
> Nevertheless, you may give it a try as is. Or improve it for special cases.
>
> Samuel
>
>
> ___
> users mailing list
> users@lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>
>


-- 
There we have the salad.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Model ID of First order delay and Dead Time Process

2016-03-12 Thread Serge Steer

You made a mistake because the response you compute with
rep=flts(u,tf2ss(h)); k=find(rep<>0,1)
is not exactly a step response because the step does not occur at the 
first sample


If you use
H=time_id(10,u,rep)
to identify the response you vill got a batter result

An other an probably better solution is to extract the delay before 
starting the identification:
k=find(rep<>0,1) //here the threshold has to be improved in case of 
noisy signal

H=time_id(1,"step",rep(k:$))

Serge
Le 11/03/2016 18:44, noguchi a écrit :

Dear Mr.Serge,


Thank you for your advise. I tried to use time_ID.
Please look at the following Scinote:

z=poly(0,'z');
h=(0.07/(z-0.934))*(1/z^10)
u=zeros(1,100);
for i=6:1:100
 u(1,i)=1;
end
t=1:1:100;
rep=flts(u,tf2ss(h));
plot(t,rep,t,u)
H=time_id(10,'step',rep)
rep=flts(u,tf2ss(H));
plot(t,rep,'.r')

There is a big difference between the original model equation and Identified
model equation.
The responsed curves are also different each other.
Are there any good command so that I can obtain parameters for first order
time delay constant and its gain and dead time?

Thank you foryour help.


Y. Noguchi




--
View this message in context: 
http://mailinglists.scilab.org/Model-ID-of-First-order-delay-and-Dead-Time-Process-tp4033659p4033692.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users



___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users