Solve a differential eqn

Thread Starter

admantium

Joined Oct 28, 2011
1
I need to design a ckt for the following matlab code....The code tries to numerically solve the equation

y'' + 3xy' + 3y = 0

Here, u is assumed to represent dy/dx or y'. dx is approximated as x1 - x. Similarly, dy = y1 - y and du = u1 - u. The value 'a' provides the number of times the numerical loop is executed. u1, x1 and y1 represent the new values of u, x and y. Thus, x1 = x + dx, y1 = udx + y, u1 = u - 3xudx - 3ydx. The ckt executes by loading the initial values of x, y, u, dx, and a.

code

clc;
clear all;
close all;
x=input('enter x');
y=input('enter y');
u=input('enter u');
dx=input('enter dx');
a=input('enter numerical iterations');
while x < a,

u=u-3*x*u*dx-3*y*dx;
y = y + u*dx;
x = x + dx;

end

xfinal=x
yfinal=y
Ufinal=u


Specifications to be me :t
1> The maximum size of inputs should be integers of size 32 bits
2> use of clock signal should be avoided if possible

Help required:
1>when i design the circuit, i am unable to sequence the events to occur one after the other. Kindly advice.
2>Too many registers and flip-flops are used... I need to optimize them.. If anybody could post the general logic diagram even that would be fine.

Thnxs in advance
 

bountyhunter

Joined Sep 7, 2009
2,512
y'' + 3xy' + 3y = 0

I recognize the equation's form as nonlinear differential equation. When I was in school, we solved it using an analog computer. It would iterate numerical values and zero in on a convergence point. I have no idea how to do it digitally if it is possible.
 

Papabravo

Joined Feb 24, 2006
21,228
You solve it digitally by writing expressions for the derivatives and folowing the computations to develop the solution, Collecting the data for a phase plane plot is a good way to do it. With pencil and paper the method of isoclines may be of interest to you.
 
Top