help-octave
[Top][All Lists]

## Re: Multiple variables in ode45

 From: Ron Crummett Subject: Re: Multiple variables in ode45 Date: Tue, 06 Dec 2005 09:50:23 -0800 User-agent: Mozilla Thunderbird 1.0.7 (X11/20050923)

Vl is; well, it is my input signal. This differential euqation models a cruise controller where one vehicle gets its velocity based on the velocity of the vehicle in front of him. I am working on a fuzzy-logic based implementation for a class. I have gotten the original linear controller to work using Simulink (the whole block design made it easy...) but I don't have fuzzy logic blocks to do the fuzzy controller and I would like to see if I could do the whole thing in Octave. The solution to this equation is used in my fuzzy logic control system to determine an output that drives the automobile.
```
```
Anyway, to the actual question. Vl is the velocity of the lead vehicle and I have defined it to start at 0, then climb to 13.4 (m/s, 30 mph) over 5 seconds, hold constant for 10 seconds, and then drop back to 0 over 3 seconds. So it is a piecewise-defined function, I guess that's the best way to put it. I hope that helps, and thanks so much for the help given me.
```
-Ron

Shai Ayal wrote:

```
```I'm not sure I understand -- is Vl a function or constant?
```
In general you e to solve your two equations (for u_dot and Vf_dot) simultaneously, and ide45 should be able to do this.
```
Shai

Ron Crummett wrote:

```
```Hi all -

```
I am trying to solve a differential equation with ode45 that has two input variables and one output, but one of the input variables is dependent on the other. When I try searching for anything like this it is to no avail (maybe I don't know what to search for).
```
Anyway, the equation is

u_dot = 0.5*e_dot+1.64*(e-1.14*Vf_dot)

```
where e = Vf-Vl, Vl is my input, and Vf is my output. The value of u is then fed into another system (which I do have the diff. eq. for) to get Vf, if that helps.
```
Could someone give me some pointers on how to do this?  Thanks.

-Ron

-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------

```
```
```
```

-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------

```