# Differential Equation to Transfer Function

#### 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. #### CaptainBlack

MHF Hall of Fame
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. $$\displaystyle 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:

$$\displaystyle 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):

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

So:

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

or:

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

CB

#### 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,

#### CaptainBlack

MHF Hall of Fame
Hello,

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

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

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

CB

#### wqvong

$$\displaystyle a_0\cos(\omega t)$$ is the forcing or input function $$\displaystyle 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,

Last edited:

#### CaptainBlack

MHF Hall of Fame
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.

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