Dear Tim,
<br/><br/><br/>Thank you for your reply.
<br/><br/><br/>First, you're not doing what I recommended you do. Why? <== As I informed you that my inut u is not periodic. I thought that it is not practical to use fft to my problem. Is my understanding not right? Is fft the recomeded method for my problem?
<br/>In addition to that I am not familiar with fft.
<br/><br/><br/>Best Regards,
<br/><br/><br/>----- 元のメッセージ -----
<br/>差出人: "Tim Wescott [via Scilab / Xcos - Mailing Lists Archives]" <<a href="/user/SendEmail.jtp?type=node&node=4034688&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>>
<br/>宛先: "Fukashiimo" <<a href="/user/SendEmail.jtp?type=node&node=4034688&i=1" target="_top" rel="nofollow" link="external">[hidden email]</a>>
<br/>送信済み: 2016年9月28日(水曜日) 01:32:24
<br/>件名: Re: System Identification for First order delay and dead time
<br/><br/>First, you're not doing what I recommended you do. Yet you are
<br/>addressing me for help with your solution, when I've already suggested
<br/>two. Why?
<br/><br/>Second, your prototype transfer function is 11th order, and you instruct
<br/>time_id to find the best fit to a second-order transfer function. You
<br/>are surprised that get a transfer function in return that's not a good
<br/>fit. Why?
<br/><br/>Third, you've been told that Scilab does not have a pre-packaged way of
<br/>doing a fit to a system with pure time delay, and you've been given more
<br/>than one suggestion for how to roll your own. You don't seem to have
<br/>taken any of these suggestions. Why?
<br/><br/>On Tue, 2016-09-27 at 07:30 -0700, Fukashiimo wrote:
<br/><div class='shrinkable-quote'><br/>> Dear Tim,
<br/>>
<br/>> Thank you for yor advise.
<br/>>
<br/>> However, u is the step signal, such as 50% ==>60% ==> 50%.
<br/>> u and y are sampled with constant interval, such as one second.
<br/>>
<br/>>
<br/>>
<br/>> I made following Scilabe code, using time_id:
<br/>>
<br/>> //
<br/>> z=poly(0,'z');
<br/>> h=(0.065/(z-0.934))*(1/z^10)// <== 10 Sampling period dead time
<br/>> u=zeros(1,100);
<br/>> for i=10:1:100
<br/>> u(1,i)=2.0;
<br/>> end
<br/>> t=1:1:100;
<br/>> rep=flts(u,tf2ss(h));
<br/>> plot(t,rep,t,u)// <== We can see the step type process input with
<br/>> amplitude=2 and its process response with 10 sampling period dead
<br/>> time.
<br/>> k=find(rep<>0,1) //here the threshold has to be improved in case of
<br/>> noisy signal
<br/>> //H=time_id(1,"step",rep(k:$))
<br/>> H=time_id(2,u,rep)
<br/>> rep=flts(u,tf2ss(H));
<br/>> plot(t,rep,'.r')// <== We can see the process response by identified
<br/>> model.
<br/>> H
<br/>>
<br/>>
<br/>> h =
<br/>>
<br/>> 0.065
<br/>> -----------
<br/>> 10 11
<br/>> - 0.934z + z
<br/>>
<br/>>
<br/>> H =
<br/>>
<br/>> 0.0265880
<br/>> -------------
<br/>> - 0.9779092 + z
<br/>>
<br/>>
<br/>> h is the discreate transfer function to provide operation data.
<br/>> H is the identified transfer function obtained from the opeartion data
<br/>> using time_id.
<br/>>
<br/>> I have two issues.
<br/>> 1. H is not similar to h even the data doesn't include any noise. How
<br/>> I can obtain transfer function nearly same as h?
<br/>> 2. I would like to have continuous transfer function. How I should
<br/>> convert the discreate transfer function to continuous transfer
<br/>> function.
<br/>>
<br/>>
<br/>> I am lokking for a solution for these two issues.
<br/>> May I ask your advise again?
<br/>>
<br/>>
<br/>> Thanks.
<br/>>
<br/>>
<br/>> ----- 元のメッセージ -----
<br/>> 差出人: "Tim Wescott [via Scilab / Xcos - Mailing Lists Archives]"
<br/>> <[hidden email]>
<br/>> 宛先: "Fukashiimo" <[hidden email]>
<br/>> 送信済み: 2016年9月26日(月曜日) 04:07:52
<br/>> 件名: Re: System Identification for First order delay and dead time
<br/>>
<br/>> Heh. I just realized a better way to do this:
<br/>>
<br/>> I assume that you've sampled u and y at a constant rate, and that you
<br/>> have captured some reasonable amount of the response. This will be
<br/>> perfect if u is periodic.
<br/>>
<br/>> If u is periodic, then for some integer number of periods, take U =
<br/>> fft(u) and Y = fft(y). If u isn't periodic, then take FFT's of u and
<br/>> y
<br/>> after windowing them both with identical windows.
<br/>>
<br/>> Now calculate the frequencies for each bin of the above fft's.
<br/>>
<br/>> Define H(w) = ( K ./ (%i * tau * w + 1) ) .* exp(-%i * w * T).
<br/>>
<br/>> Calculate Ymodel = U .* H(w)
<br/>>
<br/>> Now, thanks to the magic of Parseval's Theorem,
<br/>> norm(Y - Ymodel) is the same as, or just a constant multiplier away
<br/>> from
<br/>> being, norm(y - ymodel) -- but you never actually have to compute
<br/>> ymodel.
<br/>>
<br/>> So optimize on tau and T as described before. You should only have
<br/>> to
<br/>> take your FFTs once at the beginning -- the rest will be repeatedly
<br/>> calculating H(w) for the various values of tau and T (and K, if you
<br/>> want
<br/>> to be lazy and just toss it into optim, although it'll be much faster
<br/>> to
<br/>> determine it using least-squares fit).
<br/>>
<br/>> On Sun, 2016-09-25 at 01:07 -0700, Fukashiimo wrote:
<br/>>
<br/>> > Thank you for your suggestion. However, I am not sure how I should
<br/>> > formulate my Laplace domain equation. Could you please advise me
<br/>> more
<br/>> > specifically?
<br/>> >
<br/>> > Thanks.
<br/>> >
<br/>> >
<br/>> > 2016/09/25 午前9:33 "Tim Wescott [via Scilab / Xcos - Mailing Lists
<br/>> > Archives]" <[hidden email]>:
<br/>> > I suggest that you roll your own cost function, and use
<br/>> > optim.
<br/>> >
<br/>> > Where possible, with optim, if part of the problem is
<br/>> > nonlinear and part
<br/>> > is linear, it's good to use a plain old linear
<br/>> least-squares
<br/>> > fit for the
<br/>> > plain old linear part. In your case, that's K. Tau and Td
<br/>> > will have to
<br/>> > be determined by optim.
<br/>> >
<br/>> > The cost function should generate a vector for ymodel with K
<br/>> =
<br/>> > 1, then
<br/>> > find the best fit for K with
<br/>> >
<br/>> > K = y / ymodel;
<br/>> >
<br/>> > then return a cost
<br/>> >
<br/>> > cost = norm(y - K * ymodel);
<br/>> >
<br/>> > wrap that all up in NDCost and then optim, and away you'll
<br/>> > go.
<br/>> >
<br/>> > On 2016-09-24 06:59, Fukashiimo wrote:
<br/>> >
<br/>> > > Hello,
<br/>> > >
<br/>> > > I am looking for a Scilab software which is similar to
<br/>> > Matlab System ID
<br/>> > > tool
<br/>> > > box.
<br/>> > >
<br/>> > > I would like to obtain values of parameters, Tau, K and
<br/>> Td
<br/>> > for
<br/>> > > following
<br/>> > > first order delay + Dead time model from time series
<br/>> data.
<br/>> > > ymodel = (K/(Tau*s+1))*exp(-Td*s)*u
<br/>> > > ymodel: process output, u: process input
<br/>> > > SISO continuous time
<br/>> > >
<br/>> > > Object function: Min ( (y-ymodel)^2)
<br/>> > >
<br/>> > > Could you please tell me which package I should use to
<br/>> solve
<br/>> > this
<br/>> > > issue?
<br/>> > >
<br/>> > > Best Regards,
<br/>> > >
<br/>> > >
<br/>> > >
<br/>> > > --
<br/>> > > View this message in context:
<br/>> > >
<br/>> >
<br/>> <a href="http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608.html" target="_top" rel="nofollow" link="external">http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608.html</a>
<br/>> > > Sent from the Scilab users - Mailing Lists Archives
<br/>> mailing
<br/>> > list
<br/>> > > archive at Nabble.com.
<br/>> > > _______________________________________________
<br/>> > > users mailing list
<br/>> > > [hidden email]
<br/>> > > <a href="http://lists.scilab.org/mailman/listinfo/users" target="_top" rel="nofollow" link="external">http://lists.scilab.org/mailman/listinfo/users</a>
<br/>> > _______________________________________________
<br/>> > users mailing list
<br/>> > [hidden email]
<br/>> > <a href="http://lists.scilab.org/mailman/listinfo/users" target="_top" rel="nofollow" link="external">http://lists.scilab.org/mailman/listinfo/users</a>
<br/>> >
<br/>> >
<br/>> >
<br/>> >
<br/>> ______________________________________________________________
<br/>> > If you reply to this email, your message will be added to
<br/>> the
<br/>> > discussion below:
<br/>> >
<br/>> <a href="http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034619.html" target="_top" rel="nofollow" link="external">http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034619.html</a>
<br/>> > To unsubscribe from System Identification for First order
<br/>> > delay and dead time, click here.
<br/>> > NAML
<br/>> >
<br/>> >
<br/>> >
<br/>> ______________________________________________________________________
<br/>> > View this message in context: Re: System Identification for First
<br/>> > order delay and dead time
<br/>> > Sent from the Scilab users - Mailing Lists Archives mailing list
<br/>> > archive at Nabble.com.
<br/>> > _______________________________________________
<br/>> > users mailing list
<br/>> > [hidden email]
<br/>> > <a href="http://lists.scilab.org/mailman/listinfo/users" target="_top" rel="nofollow" link="external">http://lists.scilab.org/mailman/listinfo/users</a>
<br/>> --
<br/>>
<br/>> Tim Wescott
<br/>> www.wescottdesign.com
<br/>> Control & Communications systems, circuit & software design.
<br/>> Phone: 503.631.7815
<br/>> Cell: 503.349.8432
<br/>>
<br/>>
<br/>> _______________________________________________
<br/>> users mailing list
<br/>> [hidden email]
<br/>> <a href="http://lists.scilab.org/mailman/listinfo/users" target="_top" rel="nofollow" link="external">http://lists.scilab.org/mailman/listinfo/users</a>
<br/>>
<br/>>
<br/>>
<br/>>
<br/>>
<br/>> If you reply to this email, your message will be added to the
<br/>> discussion below:
<br/>> <a href="http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034622.html" target="_top" rel="nofollow" link="external">http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034622.html</a>
<br/>> To unsubscribe from System Identification for First order delay and
<br/>> dead time, click here .
<br/>> NAML
<br/>>
<br/>>
<br/>> ______________________________________________________________________
<br/>> View this message in context: Re: System Identification for First
<br/>> order delay and dead time
<br/>> Sent from the Scilab users - Mailing Lists Archives mailing list
<br/>> archive at Nabble.com.
<br/>> _______________________________________________
<br/>> users mailing list
<br/>> [hidden email]
<br/>> <a href="http://lists.scilab.org/mailman/listinfo/users" target="_top" rel="nofollow" link="external">http://lists.scilab.org/mailman/listinfo/users</a>
</div>--
<br/><br/>Tim Wescott
<br/>www.wescottdesign.com
<br/>Control & Communications systems, circuit & software design.
<br/>Phone: 503.631.7815
<br/>Cell: 503.349.8432
<br/><br/><br/>_______________________________________________
<br/>users mailing list
<br/>[hidden email]
<br/><a href="http://lists.scilab.org/mailman/listinfo/users" target="_top" rel="nofollow" link="external">http://lists.scilab.org/mailman/listinfo/users</a>
<br/><br/><br/><br/><br/><br/>If you reply to this email, your message will be added to the discussion below: <a href="http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034654.html" target="_top" rel="nofollow" link="external">http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034654.html</a>
<br/>To unsubscribe from System Identification for First order delay and dead time, click here .
<br/>NAML
<br/>
<br/><hr align="left" width="300" />
View this message in context: <a href="http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034688.html">Re: System Identification for First order delay and dead time</a><br/>
Sent from the <a href="http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html">Scilab users - Mailing Lists Archives mailing list archive</a> at Nabble.com.<br/>