help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: control problem: lsim


From: vathomas
Subject: Re: control problem: lsim
Date: Mon, 25 Feb 2013 15:55:35 -0800 (PST)

Dear Rudolf

I cannot answer your first question regarding the error you take, since I
cannot reproduce it.

But as long as the discretization is concerned, there is not a single way to
go from a continuous model to a discrete one. You think the best model is of
the type H(s) = G s/(s+p1)(s+p2), with p1 and p2 a complex conjugate pair
(let p1 = a + b j and p2 = a - b j, with a,b in R). This means you want to
identify 3 unknowns, that is G, a and b.

Discretizing H(s):
using ZOH assumption, results in Hd(z) = (c0*z + c0)/(z^2 + c1*z + c2*z).
using Tustin (bilinear) approximation, results in Hd(z) = (c0*z^2 + c0)/(z^2
+ c1*z + c2*z).
using FOH assunption, results in Hd(z) = (c0*z^2 + c1*z + c2)/(z^2 + c3*z +
c4*z). (This is not implemented in octave, just to point out the
possibilities.)

Note that in all the previous case the unknowns are three (even in the FOH,
the coefficients are not linearly independent). Also as far as I know, you
cannot put extra constrains in the identification of arx models (like to
coeffs to have the same value). What I would do, is the following: If you do
not really need the continuous model work with the discrete. If you needed
it:
1. Check with ZOH discretization and see if coeffs in nominator are almost
equal. If yes, try d2c with 'zoh' option. Then try also with Tustin to see
if it matches the pattern.

2. If the previous is not satisfactory: a) pick Tustin approximation, b) do
the calculations in paper of how the coeffs c0, c1 and  c2 are related to
the coeffs G, a, b (remeber s = 2(z-1)/T(z+1)  [1]), c) set the least square
identification problem to find c0, c1 and c2 (check Yule-Walker equations in
[2] which you have to modify), d) solve for the continuous model coeffs. 
I know this is not the fastest way, since you have to write you own code,
but ...


Best Regards

Thomas

[1] http://en.wikipedia.org/wiki/Bilinear_transform
[2] http://en.wikipedia.org/wiki/Autoregressive_model



--
View this message in context: 
http://octave.1599824.n4.nabble.com/control-problem-lsim-tp4650247p4650294.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]