# Differential Equation to Transfer Function

• May 12th 2010, 09:38 PM
wqvong
Differential Equation to Transfer Function
Hello,

I have done this in a long time but is this right? I have a differential equation and I want to find the transfer function. Is that right?

Thanks,

r, m, and k are numbers.

http://members.dslextreme.com/users/...20Function.jpg
• May 13th 2010, 12:03 AM
CaptainBlack
Quote:

Originally Posted by wqvong
Hello,

I have done this in a long time but is this right? I have a differential equation and I want to find the transfer function. Is that right?

Thanks,

r, m, and k are numbers.

http://members.dslextreme.com/users/...20Function.jpg

$m\frac{d^2}{dt^2}x(t)+r\frac{d}{dt}x(t)+kx(t)=a_0\ cos(\omega t)$

This is of the form:

$m\frac{d^2}{dt^2}x(t)+r\frac{d}{dt}x(t)+kx(t)=y(t)$

Now take the Laplace Transform (and assume zero initial conditions):

$ms^2X(s)+rsX(s)+kX(s)=Y(s)$

So:

$X(s)=\frac{1}{ms^2+rs+k}Y(s)$

or:

$G(s)=\frac{1}{ms^2+rs+k}$

CB
• May 13th 2010, 06:39 AM
wqvong
Hello,

What happens to a0 cos(wt)? let assume that the initial condition is not zero how would i solve for it now?

Thanks,
• May 13th 2010, 07:10 AM
CaptainBlack
Quote:

Originally Posted by wqvong
Hello,

What happens to a0 cos(wt)? let assume that the initial condition is not zero how would i solve for it now?

Thanks,

$a_0\cos(\omega t)$ is the forcing or input function $y(t)$

The initial conditions are zero, that is how you construct a transfer function.

CB
• May 13th 2010, 10:45 AM
wqvong
Quote:

Originally Posted by CaptainBlack
$a_0\cos(\omega t)$ is the forcing or input function $y(t)$

The initial conditions are zero, that is how you construct a transfer function.

CB

Ok, I get that part. What happens when the initial condition isn't zero anymore? lets just say it is 1. Do i have to take the Laplace of (ao cos wt) = s / (s^2 + w^2), multiple it by the transfer function where it will equal to

s / (s^2 + w^2) * 1 / (k + r s + r s^2) ?

or i still use the regular transfer function 1 / (k + r s + r s^2) and plug one into that?

Another question I have is, lets say I solve the second order differential equation and I come up with the general solution. If i take the Laplace transform of that is that similar to the transfer function? What is the differences?

Thanks,
• May 13th 2010, 02:13 PM
CaptainBlack
Quote:

Originally Posted by wqvong
Ok, I get that part. What happens when the initial condition isn't zero anymore? lets just say it is 1. Do i have to take the Laplace of (ao cos wt) = s / (s^2 + w^2), multiple it by the transfer function where it will equal to

s / (s^2 + w^2) * 1 / (k + r s + r s^2) ?

or i still use the regular transfer function 1 / (k + r s + r s^2) and plug one into that?

The system you are deriving a transfer function for is like a black box and the transfer function relates the output to the input. When you plug the device in the initial conditions are all zero by definition.

Quote:

Another question I have is, lets say I solve the second order differential equation and I come up with the general solution. If i take the Laplace transform of that is that similar to the transfer function? What is the differences?
No, you are doing something different from characterising the behaviour of a linear system to an arbitrary input.

CB