Implementation of transfer functions
Implementation of transfer functions
(OP)
Hi,
I have a question that bothers me.
How transfer functions are implemented in Software or in Hardware in real life?
For example in Matlab. When we apply a transfer function to data I imagine something like this: First the Laplace transform is applied to the data, then the transfer function is applied, and then the inverse Laplace transform of the data is obtained.
But I think this is not the case, because the numerical Laplace transform is a complicated problem.
Another solution would be, Matlab applies the inverse Laplace transform of the transfer function, and then we obtain a differential equation. After that the differential equation is integrated. But in this case, what is the use of the transfer function?
If anybody has an answer to this I would be very grateful.
Regards,
Janus
I have a question that bothers me.
How transfer functions are implemented in Software or in Hardware in real life?
For example in Matlab. When we apply a transfer function to data I imagine something like this: First the Laplace transform is applied to the data, then the transfer function is applied, and then the inverse Laplace transform of the data is obtained.
But I think this is not the case, because the numerical Laplace transform is a complicated problem.
Another solution would be, Matlab applies the inverse Laplace transform of the transfer function, and then we obtain a differential equation. After that the differential equation is integrated. But in this case, what is the use of the transfer function?
If anybody has an answer to this I would be very grateful.
Regards,
Janus





RE: Implementation of transfer functions
Does that answer your question?
xnuke
"Live and act within the limit of your knowledge and keep expanding it to the limit of your life." Ayn Rand, Atlas Shrugged.
Please see FAQ731-376: Eng-Tips.com Forum Policies for tips on how to make the best use of Eng-Tips.
RE: Implementation of transfer functions
But then, why do we put a transfer function in MATLAB? and what is the real use of transfer functions?
Thanks a lot!
RE: Implementation of transfer functions
What did you think a transfer function was 3 months ago?
TTFN
I can do absolutely anything. I'm an expert!
homework forum: //www.engineering.com/AskForum/aff/32.aspx
FAQ731-376: Eng-Tips.com Forum Policies forum1529: Translation Assistance for Engineers
RE: Implementation of transfer functions
I'm learning this subject by myself and I have some gaps in knowledge about it.
The way I saw it before is that a tf is a more convenient way to write the differential equations. And that there must be a numerical process, implemented in software, to compute the output from the input given a transfer function. Now I don't see how that is possible, since computing the inverse Laplace transform numerically seems so difficult. So I wonder how mathematical software handles this.
Thanks,
Janus
RE: Implementation of transfer functions
While some people eschew using Wikipedia, that doesn't mean that one should blow off one of the largest repositories of knowledge in the world; one should read what it says and drill down to make sure that the material is correctly covered. To wit, I suggest you read: https://en.wikipedia.org/wiki/Transfer_function first, then ask further questions.
TTFN
I can do absolutely anything. I'm an expert!
homework forum: //www.engineering.com/AskForum/aff/32.aspx
FAQ731-376: Eng-Tips.com Forum Policies forum1529: Translation Assistance for Engineers
RE: Implementation of transfer functions
But if you really understand how Matlab uses transfer functions, you could very well answer instead of getting into a silly argument.
RE: Implementation of transfer functions
Since you are specifically interested in Matlab, you should look at: http://www.mathworks.com/help/control/examples/cre... As you can see, Matlab does not care how you wish to express the transfer function.
However, that was not your original question: "How transfer functions are implemented in Software or in Hardware in real life?" Unless, that wan't really even the question. This was what I was trying to find out and still have not found out.
TTFN
I can do absolutely anything. I'm an expert!
homework forum: //www.engineering.com/AskForum/aff/32.aspx
FAQ731-376: Eng-Tips.com Forum Policies forum1529: Translation Assistance for Engineers
RE: Implementation of transfer functions
First I want to clarify what I think the OP is asking, and I will use an example to do so:
Let's say I have a DC motor. All textbooks and classes (hopefully) will show you how to derive the transfer function for this. Perfect, now I have a transfer function for this DC motor. Then the text book and classes show that if I put this DC motor in negative feedback and add a controller (PID, lead/lag, just K, etc.) I will get a certain response. Then I do what the text book and classes say and I design the controller to get the response I want. Awesome, now I put it into MATLAB to verify my calculations. It worked perfectly, life is so good.
Now, how do this actually work in REAL LIFE???
My first thought was, "How do I put this transfer function into hardware/microprocessor/whatever you want to call it?" (And I believe this is what the OP is really after). So here is the simple answer ... you don't.
Think of it this way: The transfer function is nothing more than math that represents the DC motor. So in real life: the DC motor is the transfer function. All of the hand calcs and MATLAB is just to help design/verify the controller. Once you have the controller designed then the controller is what you need to put into the hardware/microprocessor.
Don't worry about the whole laplace/inverse laplace thing as far as hardware goes. That stuff is ONLY to help you represent the system with "easier" math, which ultimately helps you design the controller.
I could go on with this but I will leave it here for now. If anyone wants more clarity or further instruction I would be happy to do so.
Best!
RE: Implementation of transfer functions
Perhaps the intended question was "When I design control systems the way my college course taught me to, I come up with an controller that looks like an equation written in the s domain. When I go to connect my motor to it, I find that my equation doesn't have any terminals on it to attach the wires. I've been taught how to implement that equation using passive components and Op Amps, but my employer wants me to do it in a computer. How?"
When I left university thirty years ago, I thought the answer was going to be "well you should have designed it in the z domain, shouldn't you".
Then I started pulling apart the software for various real-life digital autopilots and engine controllers and got a surprise. Everybody, without exception, had designed their digital controllers using traditional Laplace methods, then implemented the s domain equations digitally. They had simply said that (Xn=Xn-1 + Constant * Input) behaves so like an integrator as makes no odds, then crafted feedback loops to build the rest of their controller transfer function from that basic building block. Nothing like the digital control system design textbooks said at all, but it worked, the designers were comfortable with it because they understood what they had done and (I believe) a lot of it is still flying around today.
A.
RE: Implementation of transfer functions
After teaching at university for several years (unfortunately not in a controls class) I constantly have students asking how is an s domain controller used in real hardware. I eventually had students create simple control system lab experiments for their senior design projects in order to be used in conjunction with our controls lab. These experiments require students to design controllers using classical methods and then "realize" them into a computer, which has helped tremendously with student understanding of the subject matter.
For all new controls engineers or enthusiasts what zuesfaber said is Gold for creating your first simple controller to achieve zero steady state error (assuming closed loop stability). I have used that exact control logic in many industry products, and it works great!
If anyone needs more info on this I am happy to help, because I remember the agony all to well of wondering how this all works :)