Sorry, the speed is not correct. You should derivate x(t) with the
product formula and you will see it. The complex notation is much
easier.

With C and D the initial conditions have to be satisfied. They have to
be calculated solving the problem of two equations with two unknown
variables C and D. If you use "tau" instead of "t" then tau=0 at the
beginnig of the step (=sample?) which makes things much easier.

Sorry, I have only a few minutes during my lunch-break, not enough to
solve complicate problems like yours. I'll be back in office thursday.
Good Luck with Jan. :-)

Hope you have had a nice relax - or just extra work maybe ?

I'm not brave enough to start with complex notation at this level, but I can
see the elegance of using it.
I found results as below. I use x = x(t), x' = x'(t), d = delta, y = y(t),
y' = y'(t) in order to compress formulas:
x = A + B*t + exp(-d*t)*[C*cos(w*t) + D*sin(w*t)]
x' = B - exp(-d*t)*[(C*d - D*w)*cos(w*t) + (C*w + D*d)*sin(w*t)]
C = exp(d*t)*[ -(A + B*t - x)*cos(w*t) + (A*d + B*(d*t+1) - x*d - x')*sin
(w*t)/w]
D = exp(d*t)*[ -(A + B*t - x)*sin (w*t) - (A*d + B*(d*t+1) - x*d -
x')*cos(w*t)/w]
and
B = y'
A = y - B*t

I do not feel sure, do you mean to find x and x' for t = 0 ?
In case of this, then I found:
x(0) = y - y'*t + C => x(0) = A + C
x'(0) = y' - C*d + D*w => x'(0) = B - C*d + D*w

unknown
If the system is in equilibrium position at t = 0 then I think x(0) = 0 and
x'(0) = 0 must be true , which will result in:
0 = y - y'*t + C = A + C
0 = y' - C*d + D*w = B - C*d + D*w

I do of course understand this. If we are close to a solution I hope you
will asist the during the final step, then I can be "Kunta Kinte" and do the
"hard work".
If you are interrested I will of course send the full result to you by
e-mail, if you or others could use it in the future...

1.) First I would prefer to test it analytic in my Mathware.
2.) Second I will test it approximated in MS-Excel before I make the final
C-implementation at my simulator system.
I do not feel sure in which of the two cases I have to use tau or not as
well as how to handle initial conditions of C and D in 1.)
I have made models in both Mathware and MS-Excel without success.

"Torben W. Hansen" <[Only registered users see links. ]> skrev i en meddelelse
news:bqirsf$mgd$[Only registered users see links. ]...

I have put the Mathware version including graphs of y(t), x(t), coefficients
A,B,C and D: [Only registered users see links. ]
Maybe you can see if I have done something wrong.

I traveled to Aachen. The new train makes 300 km/h. That's Stuttgart-
Frankfurt one hour, Frankfurt-Köln one hour, Köln-Aachen one hour.
The last one was very slow, but people told me that it is the fastest
train in Europe when going from Bruxelles to Paris.
In Aachen I followed some lectures about nonlinear materials in
nonlinear statics, very hard "bread".

....

No. To find C and D because for t = 0 you know x and x'. Do you really
know what you are doing ? The solution of a diffential equation is not
very sophisticated, but it looks as if you yet did not understand the
basics, sorry.
C and D should not grow if you use tau with tau=0 at the beginning of
each step.

"Anselm Proschniewski" <AnselmPro@mercedes-benz-portal.invalid> skrev i en
meddelelse news:bqn4lc$n1a$[Only registered users see links. ]-felb.debis.de...

According to "Einstein's Relativity Therorem" - With that train you got a
"little" bit younger.

I believe you... For me 2'nd order ODE is hard "bread" ... "everything is
relative" (Einstein again).

OK - then I should insert initial values below for x(0), x'(0), A and B and
solve for C and D, but I'm not sure any longer what to insert as initial
values.
x(0) = A + C
x'(0) = B - C*d + D*w

In the beginning I felt that I understood your explanation, but it has been
"messed up" a little bit, so if you could correct the errors at the latest
weblink, this would maybe be the easiest way.

I'm a programmer and as mentioned in the early postings "I'm amatuer in
differential equations", but it has not been easy for me either to explain
the application and
neither what a sample is, which maybe is a critical point in this debate.
The most sofisticated ODE I have learned to solve is: y'' = k*y for k = R+,
k=R- and k=0.
Therefore I asked for help, but simultaniously with this discussion, and
exactly now, I'm reading about 2'order linear, homogenius DE's.
I have just learned: If y = exp(r*t) and r is root in the characteristic EQ
ax^2 + bx + c then exp(r*t) is one solution to ay'' + by' + cy = 0.
If there are two different roots r1, r2, then the general solution is y =
C1*exp(r1*t) + C2*exp(r2*t) and if double root, then a solution is y =
C1*exp(r1*t) + C2*t*exp(r2*t).
If the two roots are complex (r1 =A + i*B and r2 = A - i*B, conjugated )
this results in a solution as
y = C1*exp(A*t)*cos(B*t) + C2*exp(A*t)*cos(B*t) - exactly the solution we
have worked with, but without any particular part.
Note: y upon has nothing to do with the excitation y.

I can promise you that I have not been sleeping very much during several
weeks. In order to be able to understand I have been reading so terrible
much
that my brain is a little overloaded and therefore I'm maybe not always able
to "see the wood because of all the trees".

As you wrote earlier, and which I do understand, my application is a little
different from the ODE mentioned above because of the excitation y as
follows:
M*x'' + D*x' + K*(x-y) = 0 => M*x'' + D*x' + K*x = K*y,
Type A at the drawing from Jan : [Only registered users see links. ]

I'm sorry - but now I maybe present some more foolish questions:
1) We have worked with the solution for M*x'' + E*x' + K*x = 0, does it
means that we have solved M*x'' + E*x' + K*x = K*y for y = 0 ?
2) If x(t) = A+B*t + C*exp(-d*t)*cos(w*t) + D*exp(-d*t)*cos(w*t), from where
is the paticular part derived (A+B*t - I know it is the excitation y) ?
In the lecture I'm reading there is nothing about the particular part - only
the homogenious part is mentioned. I do not really understand what distance
A is and what speed B is.
3) Are A and B parametres, which can be visualized on the drawing from Jan ?
4) Is it possiblible that you could correct the weblink, maybe I will
understand then ? [Only registered users see links. ]
I hope my questions can be understood...

step.
As presented at the weblink in my latest posting I try to test the exact
solution in a math software on my PC - not in the simulator, therefore I do
not understand why you say "use tau with tau=0 at the beginning of each
step" ?
From my point of view a time step is the time between two samples in the
simulator but the math software does not sample. ( If you like I can make a
drawing explaining samples to put on the web).

Note: If you find it too complicated to explain further, it's of course ok
to give up...

Yes, but it is "foolish" to set y=0. That could be the initial condition
for the first sample, why not. But for the next sample y should have a
value.

Basic theorie of most differential equations: the "particular" part of
the solution should have "type of the right side".
If your y(t) has form sinus and cosinus, x(t) should be of tis type.
So we "try" x(t)=A*cos(wt)+B*cos(wt) and calculate A and B depending on
the coefficients of the equation.
If y(t) is a polynom, we "try" a polynom with the same degree for x(t).

Consider: the equation is linear, so if x1(t) fullfills it and x2(t)
fullfills it, than x1(t)+x2(t) fullfills it too.

Your correct equation is (in dimension "force") is:

M*x'' + E*x' + K*x = K*y + E*y'

The "E*y'"-term we forgot, but it should be considered. y(t) is given as
a polygon (not polynom), it is a linear function "in parts". So x(t)
should have the same "type", x(t) = A+B*t is to be "tried".

I dont understand #13: A = y(t) - y'(t)*t
To tell the truth I think I don't understand our "sample". Is the sample
the point of time when the analysis is once done ? Does this work in
form of an endless loop ?
Your result is false because the damping is increasing. That shold not
be.

"Jan C. Hoffmann" <[Only registered users see links. ]> skrev i en meddelelse
news:bqs9s6$12q$[Only registered users see links. ].aol.com...

Hello Jan,

Yes now it is, but not earlier it wasn't, and I have not forgot that you
told me this previously.
I have had this in my mind all the time...

Yes, if E*y'=0 then we talk about Type A: M*x'' + E*x' + K*x = K*y

Yes I can ...

Another thing is I think type A is maybe a better approximation to my
application. I didn't know this when you asked me the first time.
But the solution of Anselm was neither Type A, B or C - it was M*x'' + E*x'
+ K*x = 0, which not is my application .

Anyway I have learned a lot.

I asked you previously, but you gave me not a direct answer therefore I ask
again:

Yes we have solved M*x'' + E*x' + K*x = 0
which not is my application.

K*y + E*y'
This is Type C, which Jan has solved with correct result. But if there is an
alternative way
where I not should program a Runge/Kutta solver first, then I would prefer
this.
During our conversation I am convinced that an ODE of Type A fits better
to my application, which has the form:
M*x'' + E*x' + K*x = K*y
and if I could find the analytic solution of this, then I'm sure that I
can solve my problem too.

I think I understand and here I try to explain with my own words:
If we call the excitaion for the input to a system described by a
differential equation,
then the output of the system is the input (particular part) plus the
response
contribution (homogenius part). You could also say that the homogenious
part is riding at the particular part. Therefore the particular part is of
same
type as the input (excitation).

Yes!
Usually computers has a kind of a timer-unit.This timer-unit can be set to
execute a particular program once every T second, in my case T = 1/20 sec.
= 50 milli sec. This is usefull in realtime applications which usually is
monitoring some events in "the real world" for example a joystick position
controlled by a person. If the computer should write the joystick position
in a display in real-time, the computer has to execute the instructions as:
1. read the joystick position,
2. write the position in the display.
If these two instructions are put into the program called SAMPLE, then the
joystick position will be written in the display 20 times per second as long
as the computer is switched ON. The time to execute SAMPLE program
(the two instructions 1. and 2.) must be less than 1/20 second otherwise it
conflicts with the next execution of SAMPLE - it often takes only few micro
seconds.
The time from one execution to the next execution of SAMPLE is called the
"sample period", in my application it is 1/20 sec. It is more common to say
that the "sample frequency" is 20 Hz.

Yes! Because the SAMPLE program is executed every 1/20 second.

Now let's try to take a little more sophisticated example:

Instead of reading a joystick the computer reads the position y of a
particle P in one direction.

Now we will build a SAMPLE program which can write the position y and
speed y' of P in a display every 1/20 second.

We define computer variables and when the computer is swithced ON it
initializes the variables as follows:
y = 0, position of P
y0 = 0, old position of P from previous sample
y' = 0, speed of P

The y, y0 and y' keep their values and are only changed when SAMPLE
is executed.

In general math you know that:
y' = dy/dt.

Because dy is the change of y in the period dt, then:
dy = y-y0 = current position of P minus old position of P.
dt = sample period = 1/20 second.

So therefore:
y' = dy/dt = (y - y0)/ (1/20) = speed of P

Now we write the SAMPLE program, which will be executed every 1/20 second:

BEGIN SAMPLE PROGRAM
1. read the position of P into y,

2. calculate speed of P and store the current position y in y0, because it
will used as old position in next sample.
y' = (y - y0) / (1/20), Here the speed is calculated.
y0 = y, The position y is stored in y0, which
will be used as "old position" in
next sample

3. write the position y of P and the speed y' of P in display
END OF SAMPLE PROGRAM

As you see y is always the latest sample and y0 always the sample before.
Just as you explained two samples can be seen as a "polygon"or a
"polynomial of first degree", which is linear in parts.
Therefore dy = y1- y0 and dt = sample period. Previous I have made a
simulation
of a first order ODE, which simulates an electrical 4 * RC-circuit based on
a resistor
R and a capacitor C, which I will try to put on a web page for you and Jan.

Resumé: A sample is one execution of the SAMPLE program, as:
1. reads input(s),
2. do calculation(s),
3. write output(s).

Was my explanation understandable ?

You told me as follows:
y = A + B*t
and I thought that
A = y and B= y'
because at first I did not understand what the particular part was.

I try to test the solution "analytic or exact" with a math software, which
not is of sampled nature and therefore it does not make any sense talk about
samples or time steps.

I agree.
Everything written upon is ment for a system of "sampled nature".
But what you saw on the web page is not a sampled system, this is a
math software where I try to test the exact (or analytic) solution before
implementation in the sampled system.
So here you should not think of previos sample, time step, local time and so
on,
only as a normal math function.
I don't know whether or not it is possible to test the solution in an
ordinary
math software with varying excitation. Now when we know that the
solution is wrong then the math at the web page is wrong too.
But if I find the correct solution for Type A, I'm sure that I at least can
test it with one single step of the excitation y at t = 0.

And now I have to joke you a little:
to your question: " Do you really know what you are doing ? "
I will say: "It happens..."
If you are interested you can take a look here: [Only registered users see links. ]
- you can even buy it in Germany - and download a "Bedienerhandbuch auf
Deutsch" too.

If I was in Germany now I would give a (or several) Christmas beer for You
and Jan.
I have been travelling in Germany in periods.

Just a correction to the paragraph:
..
..
..
As you see y is always the latest sample and y0 always the sample before.
Just as you explained two samples can be seen as a "polygon"or a
"polynomial of first degree", which is linear in parts.
Therefore dy = y - y0 and dt = sample period. Previous I have made a
simulation of a first order ODE, which simulates an electrical 4 *
RC-circuit
based on 4 resistors R and 4 capacitors C, which I will try to put on a
web page for you and Jan.
..
..
..
Best Regards
Torben W. Hansen

"Jan C. Hoffmann" <[Only registered users see links. ]> skrev i en meddelelse
news:br1lr4$m7c$[Only registered users see links. ].aol.com...

Hello Jan,

Type A could very well be the best approximation to my application, but I
did not know that in the beginning.
The damper could very well be the air friction.