# Laplace Transform

1. Aug 5, 2014

### mark1234

Hi All,

I'm playing around with an arduino, and have build a PID controller that controls the temperature of a light bulb, measured with an NTC. All is working fine

I'm looking to get a bit more theoretical on the subject and have modeled the system in a simulink like environment. I want to be able to determine the transfer function, but am not able to do it on paper and am looking for some help on it.

The system is modeled as:

Qin-Qout=V(t)^2/R-K(T(t)-T0)=C*dT(t)/dt

K and C are determined experimentally 0.77 and 50, the resistance of the light bulb ,R, is 1 Ohm.

A transfer function G(s)=(T(s)-T0)/V(s)=1/(10s+0.154) seems to fit quite well, I'm just not sure how to get from the time based function to the transfer function.

Thanks,

Last edited: Aug 5, 2014
2. Aug 6, 2014

### DScheuf

Hey mark1234,

Google "laplace transform tables". You will be able to match up your G(s) to a time domain function. If i recall correctly, the transfer function you have will be an exponential in the time domain.

3. Aug 7, 2014

### buell23

$$e^{(-0.0154 \cdot t)}$$

4. Aug 7, 2014

### mark1234

Guess i get stuck in the Laplace transform or re-writing it to the correct form.
Solving the time equation , with boundary condition T(0)=T0:

$T(t)-T0={\frac{V(t)^2}{KR}} (1-e^{k*t/C})$

To get to the transfer function this apparently has to be rewritten in the form of:

${\frac{T(t)-T0}{V(t)}} = (e^{-k/C * t})$

I can get up to :

k/C=0.0154

${\frac{T(t)-T0}{V(t)}} = {\frac{V(t)}{KR}}(e^{-0.0154 * t})$
not quite sure how to do the last step, how to get rid of the term ${\frac{V(t)}{KR}}$

Any help is appreciated

Last edited: Aug 7, 2014
5. Aug 7, 2014

### buell23

I am not a LaPlace specialist, but maybe I can help, it will take me I think about 10 minutes

Last edited: Aug 7, 2014
6. Aug 7, 2014

### buell23

I don't know why it does not work with latex

I don't know where you exactly got this function, but if you can say that

$$f_{(t)}={\frac{T(t)-T0}{V(t)^2}}$$

Then this way should be correct

$$G_{(s)} = \int^{\infty }_{0} f_{(t)} \cdot e^{(-st)} \, dt$$

$$f_{(t)}=\frac{1}{K \cdot R} \cdot (1-e^{(\frac{k}{c} \cdot t)})$$

$$G_{(s)} =\frac{1}{K \cdot R} \cdot \int^{\infty }_{0} (1-e^{(\frac{k}{c} \cdot t)}) \cdot e^{(-st)} \, dt$$

$$G_{(s)} =\frac{1}{K \cdot R} \cdot \int^{\infty }_{0} (1-e^{(\frac{k}{c} \cdot t)}) \cdot e^{(-st)} \, dt$$

$$G_{(s)} =\frac{1}{K \cdot R} \cdot \int^{\infty }_{0} e^{(-st)} -e^{(\frac{k}{c} \cdot t)} \cdot e^{(-st)} \, dt$$

$$G_{(s)} =\frac{1}{K \cdot R} \cdot \int^{\infty }_{0} e^{(-st)} -e^{(\frac{k}{c}-s) \cdot t} \, dt$$

$$G_{(s)} =\frac{1}{K \cdot R} \cdot [-\frac{e^{(-st)}}{s} -\frac{e^{(\frac{k}{c}-s) \cdot t}}{(\frac{k}{c}-s)}]$$ (now using the limits)[/tex]

$$G_{(s)} =\frac{1}{K \cdot R} \cdot [0 -0 - (-\frac{1}{s} - \frac{1}{\frac{k}{c}-s}]$$

$$G_{(s)} =\frac{1}{K \cdot R} \cdot [0 -0 - (-\frac{1}{s} + \frac{1}{s -\frac{k}{c}}]$$

$$G_{(s)} =\frac{1}{K \cdot R} \cdot (\frac{1}{s} - \frac{1}{s -\frac{k}{c}}]$$

$$a = \frac{k}{c}$$

$$G_{(s)} =\frac{1}{K \cdot R} \cdot (\frac{1}{s} - \frac{1}{s -a})$$

I wanted to show how you can transform f(t) in F(s)
But you don't have to do the whole procedure
If you look at the formula f(t) you see that first you have a constant before the brackets

You can simply use the table. 1 for 1/s and e^(k/c * t) = e^(a * t) is 1/(s-a)

Last edited: Aug 7, 2014
7. Aug 7, 2014

### mark1234

Buell,

In the time function there is a squared function of V(t) present. How did you get rid of that?
The transfer function, G(s) = (T(t)-T0)/V(t)

Thanks,

8. Aug 7, 2014

### buell23

Are you sure, that you are right with your function G(s) = (T(t)-T0)/V(t)^2.
Isn't there any mistake you might have made?

G(s) = (T(t)-T0)/V(t)^2 does not make any sense for me
G(s) is a LaPlace transformed function
can not include T(t), V(t)

Last edited: Aug 7, 2014
9. Aug 7, 2014

### mark1234

The laplace transform G(s) would then be (T(s)-T0)/V(s)

I'll check if there's an error in my simulink model, or interpretation of it.

10. Aug 9, 2014

### mark1234

Attached is the simulink model of both the time series and the transfer function.

https://dl.dropboxusercontent.com/u/75646341/Knipsel.JPG [Broken]

and the result of the simulation:

https://dl.dropboxusercontent.com/u/75646341/Knipsel2.JPG [Broken]

The transfer function of V(t)^2/R-K(T(t)-T0)=C*dT(t)/dt thus appears to be 1/(10s+0.154)
I'm still not able to transform the first to the second on paper.
Or am i making an interpretation error somewhere?

Thanks

Last edited by a moderator: May 6, 2017
11. Aug 10, 2014

### mark1234

Ok, so i solved my problem:

$C \frac{\partial T(t)}{\partial t} + K(T(t)-T0) = \frac {V(t)^2} {R}$

use boundary condition T(0)=T0=0, Laplace transform gives :

$T(s).(Cs-K)= \frac {V(s)^2} {R}$

resulting in:

$G(s) = \frac {T(s)} {V(s)^2} = \frac {1/R} {Cs+K} = \frac {K} {τs+1}$

with $K= \frac {1} {RK}$ and $τ = \frac {C} {K}$

and thus leaving the V^2 in the transfer function. In my simulation (post above) the transfer function i used as just a function of V and not V^2 appeard to be flawed and only correct for one value of V.

Am i correct in stating the the V^2 can not be removed from the G(s) function?

Thanks