[Scilab-users] System Identification for First order delay and dead time

Tim Wescott tim at wescottdesign.com
Sun Sep 25 21:07:15 CEST 2016


Heh.  I just realized a better way to do this:

I assume that you've sampled u and y at a constant rate, and that you
have captured some reasonable amount of the response.  This will be
perfect if u is periodic.

If u is periodic, then for some integer number of periods, take U =
fft(u) and Y = fft(y).  If u isn't periodic, then take FFT's of u and y
after windowing them both with identical windows.

Now calculate the frequencies for each bin of the above fft's.

Define H(w) = ( K ./ (%i * tau * w + 1) ) .* exp(-%i * w * T).

Calculate Ymodel = U .* H(w)

Now, thanks to the magic of Parseval's Theorem, 
norm(Y - Ymodel) is the same as, or just a constant multiplier away from
being, norm(y - ymodel) -- but you never actually have to compute
ymodel.

So optimize on tau and T as described before.  You should only have to
take your FFTs once at the beginning -- the rest will be repeatedly
calculating H(w) for the various values of tau and T (and K, if you want
to be lazy and just toss it into optim, although it'll be much faster to
determine it using least-squares fit).

On Sun, 2016-09-25 at 01:07 -0700, Fukashiimo wrote:
> Thank you for your suggestion. However, I am not sure how I should
> formulate my Laplace domain equation. Could you please advise me more
> specifically?
> 
> Thanks.
> 
> 
> 2016/09/25 午前9:33 "Tim Wescott [via Scilab / Xcos - Mailing Lists
> Archives]" <[hidden email]>:
>         I suggest that you roll your own cost function, and use
>         optim. 
>         
>         Where possible, with optim, if part of the problem is
>         nonlinear and part 
>         is linear, it's good to use a plain old linear least-squares
>         fit for the 
>         plain old linear part.  In your case, that's K.  Tau and Td
>         will have to 
>         be determined by optim. 
>         
>         The cost function should generate a vector for ymodel with K =
>         1, then 
>         find the best fit for K with 
>         
>         K = y / ymodel; 
>         
>         then return a cost 
>         
>         cost = norm(y - K * ymodel); 
>         
>         wrap that all up in NDCost and then optim, and away you'll
>         go. 
>         
>         On 2016-09-24 06:59, Fukashiimo wrote: 
>         
>         > Hello, 
>         > 
>         > I am looking for a Scilab software which is similar to
>         Matlab System ID 
>         > tool 
>         > box. 
>         > 
>         > I would like to obtain values of parameters, Tau, K and Td
>         for 
>         > following 
>         > first order delay + Dead time model from time series data. 
>         > ymodel = (K/(Tau*s+1))*exp(-Td*s)*u 
>         > ymodel: process output, u: process input 
>         > SISO continuous time 
>         > 
>         > Object function: Min ( (y-ymodel)^2) 
>         > 
>         > Could you please tell me which package I should use to solve
>         this 
>         > issue? 
>         > 
>         > Best Regards, 
>         > 
>         > 
>         > 
>         > -- 
>         > View this message in context: 
>         >
>         http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608.html
>         > Sent from the Scilab users - Mailing Lists Archives mailing
>         list 
>         > archive at Nabble.com. 
>         > _______________________________________________ 
>         > users mailing list 
>         > [hidden email] 
>         > http://lists.scilab.org/mailman/listinfo/users
>         _______________________________________________ 
>         users mailing list 
>         [hidden email] 
>         http://lists.scilab.org/mailman/listinfo/users
>         
>         
>         
>         ______________________________________________________________
>         If you reply to this email, your message will be added to the
>         discussion below:
>         http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034619.html 
>         To unsubscribe from System Identification for First order
>         delay and dead time, click here.
>         NAML 
> 
> 
> ______________________________________________________________________
> View this message in context: Re: System Identification for First
> order delay and dead time
> Sent from the Scilab users - Mailing Lists Archives mailing list
> archive at Nabble.com.
> _______________________________________________
> users mailing list
> users at 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





More information about the users mailing list