Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Implementation of transfer functions

Status
Not open for further replies.

JanusGowda

Computer
Aug 14, 2015
6
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
 
Replies continue below

Recommended for you

It's my understanding that the transfer function model will be internally converted to a different type of model that a computer can solve, such as a discrete-time state space model, which is a set of difference equations. The appropriate input signal will then be applied to the state space model input and the output signal is found by first using numerical integration methods to integrate the state equations, then applying the output equation.

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 for tips on how to make the best use of Eng-Tips.
 
Yes it does answer to my question.
But then, why do we put a transfer function in MATLAB? and what is the real use of transfer functions?

Thanks a lot!
 
Why are you asking this when your previous thread had "'m trying to write the transfer functions of a control system: "

What did you think a transfer function was 3 months ago?

TTFN
I can do absolutely anything. I'm an expert!
homework forum: //faq731-376 forum1529
 
IRstuff, I'm sorry I'm not trying to be annoying.
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
 
Is this for school? I'm having trouble visualizing by what process you got to the point of writing transfer functions without understanding what they represent. How did you create a transfer function without knowing what the terms in the transfer function meant?

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: first, then ask further questions.

TTFN
I can do absolutely anything. I'm an expert!
homework forum: //faq731-376 forum1529
 
I tried to find an answer to my question in many online resources and in a control book without success.
But if you really understand how Matlab uses transfer functions, you could very well answer instead of getting into a silly argument.
 
I don't see an argument; I'm just trying to understand what you are really asking.

Since you are specifically interested in Matlab, you should look at: 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: //faq731-376 forum1529
 
Even though this is a few months old and the OP is already finished with this controls class I would like to respond because I once struggled with the exact same thing.

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!
 
I know we're kicking an old thread here, but this may be relevant too.

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.
 
Yes! I found the exact same thing as well.

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 :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor