# Discretization of nonlinear differential equation

Hi.
I'm working on modeling a system which have resulted in a system of first order nonlinear differential equations s'(t) = f(t, s(t), u(t))
with state vector s(t) and control input u(t) and s(t), u(t) \in R^3 The measurements are simply given by y(t) = s(t).
The continuous time model is embedded in a digital control loop where there output y(n) is a sampled version of y(t) with zero order hold and Ts = 0.1 s. Similarly the discrete control inputs u(n) is converted through zero order hold to u(t) with the same sample time.
I now want to write this model as: s(n + 1) = g(n, s(n), u(n)). I know how to do this is for a linear continous time continous model s'(t) = Ax(t) + Bu(t) with the c2d fuction but I am in doubt how to do this for the nonlinear model.
Should I linearize the continous time differential equation first or what is the best method?
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
On Tue, 17 Nov 2009 15:22:52 +0100, Edward Jensen wrote:

(I'm cross-posting my reply to sci.engr.control - really this time)
The best way to do this is the way that works right for your problem.
This being a nonlinear problem chances are that any solution is going to be approximate. If you're lucky then that's not the case, you can do an exact solution at each time step -- but then, if that were the case you probably wouldn't be asking.
What you have to fall back onto is your bag of tricks. Any effort to control a nonlinear system involves having a bag of mathematical tricks. You try out tricks from your bag, and when you find one that works well enough you test the heck out of it and you call it good.
In general when I do this sort of thing I figure out the amount of error that I can tolerate, and I choose the easiest method for solving the differential equation that meets that error criterion. This may mean trying to find an exact solution, it may mean finding a way to express the system so that I can do a one-time linearization and keep the errors in check through feedback, it may mean that I use simple rectangular integration at each step (and maybe crank the sample rate way up) -- there are a number of different methods that one can try, but if there were One True Method then folks wouldn't bother teaching so much linear systems theory.
--
www.wescottdesign.com