From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

transfer function with delay manipulation

Dear Forum members, My attached vi refers to the following explanation and query...... I have created two transfer functions (using CD Construct Transfer Function Model VI), one with a delay of 5.5 seconds and one without the delay. I then wanted to create a transfer function g(s)[1-e^5.5s] so I used the CD Subtract Models VI (transfer function without the delay minus transfer function with delay). The result of this subtraction is zero (0) however I was expecting it to be: 0.000312[1 - e^-5.5s] --------------------------------------- s^3+0.6S^2+0.12S+0.008 My question is can transfer functions with delays be manipulated using subsequent vi's or do I need to use the Pade approximation for a delay function ? Any advice or guidance would be greatfully received as always. Regards,
Message 1 of 11
(4,365 Views)

Hi bunnykins,

                     Where is your attached VI?

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 2 of 11
(4,359 Views)

Attachment included.  Not sure why it didn't load before.

I've since found some information that I would need to use the CD Convert Delay with Pade Approximation VI to incorporate the delay into the transfer function for further manipulation.  The only problem that this causes is that the model form becomes complex and difficult to check (especially if the Pade approximation is high order).  It would be good to extract out the delay function i.e. go from this Pade approximation back to the exp(-Ts) form for simplification and ease of checking (I'm not sure if this is possible?).

0 Kudos
Message 3 of 11
(4,356 Views)

The reason you can use Addition, Subtraction, Parallel is because after you try to add (or subtract) the delay, you can't really represent this algebraic operation as  (1 - e^-5.5s) as a Linear Time Invariant system. We can only represent H(s) . e^-td.s format. Notice that, if you had the same 'delay', it would propagate it properly.

 

To be able to algebraically use the delay, you can convert the delay with "Pade Approximation" to make it possible to add (or subtract), but you already noticed that this would incur on some 'approximation' and the results have a lot error.

 

What is the purpose of this operation? What is the actual application you are trying to develop? Do you need the delay express with algebraically?

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 4 of 11
(4,337 Views)

Thanks Barp,

 

I have now implemented the delay using the Pade approximation.  Initially I left it as 3rd order and checked the algebraic expressions at various points in the manipulation using Matlab, the results were identical.  This then allowed me to have some confidence in increasing the Pade approximation order to make the delay response smoother, unfortunately the algebraic expressions become high-order and complex.

Do you know if there is a method, or vi, that can identify a delay within a complex algebraic expression i.e. if we have Ae^-5.5s whereby A is say a 4th-order system and the e^-5.5s is a 10th-order Pade approximation ?  It would be good to try to go backwards by identifying/extracing the time delay from an algebraic expression.  I understand that it probably will not be possible to go back to the exact e^-5.5s delay value (5.5 seconds delay) since the Pade function is approximating.

 

The purpose of my g(s)[1 - e^-5.5s] function is to incorporate it into a Smith predictor control loop.

 

Regards,

0 Kudos
Message 5 of 11
(4,330 Views)

Oh... if your objective is to design a smith preditor, than you actually should use the Control and Simulation Loop to analyze and implent your controller. 

 

You can start with this example VI:

<LabVIEW Path>\examples\Control and Simulation\Case Studies\Process Control\Smith Predictor\Smith Predictor.vi

 

This shows how you can implement this system using the Control and Simulation Loop. Then, you can design the controller without the need to that the delay into account. If the delay in the real system matches the delay in your controller, then you should be able easily design your controller. Also, notice that if the delays do not match, then your controller will not work properly. The example tries to explain that better.

 

Another option is to use the Internal Model Control approach. Check this shipping example too:

<LabVIEW Path>\examples\Control and Simulation\Algorithms\Internal Model Control (IMC)\CDEx Internal Model Control (IMC).vi

 

That shows how you can design the controller using a filter.

 

Hope this helps.

Barp - Control, Simulation, RTT and HIL - National Instruments
Message 6 of 11
(4,321 Views)

Thanks for your response.  I have seen the Smith Predictor example that you mentioned however I've not used the Control & Simulation frame method since I ran into lots of other difficulties and problems in attempting to add additional functionality i.e. reading and writing data to file, extraction and importing transfer function parameters into the Control & Simulation frame.  Basically spent far too much time trying to figure out how to achieve my goals without any success (the LabVIEW Help files are not particularly good).

I'm implementing the program conventionally using a While loop, this way I have better control over what I need to achieve and I'm also able to implement changes to the model and control parameters and see the results directly without having to keep re-running a simulation loop.

 

Regards,

0 Kudos
Message 7 of 11
(4,284 Views)

coincedentally , I am working on the same prob, how did resolve the prob? I mean hints on hw to go about  the smith predictor issues.

 

thanks

 

kaydgreat

0 Kudos
Message 8 of 11
(4,148 Views)

Hi KDGREAT, 

 

You'll probably get a better response if you start your own thread and link back to this one.

 

On that note, It looks like the original poster moved their model to a regular while loop instead of a simulation loop. 

 

Cheers,

 

Zach

Applications Engineer
National Instruments
CLD Certified
0 Kudos
Message 9 of 11
(4,133 Views)

Hey KDGREAT,

 

As Barp mentioned above, I recommend investigating the Smith Predictor example with the Control Design and Simulation module.

 

<LabVIEW Path>\examples\Control and Simulation\Case Studies\Process Control\Smith Predictor\Smith Predictor.vi

 

This solution takes advantage of the Control & Simulation Loop as opposed to a standard While Loop. The original poster mentioned that they had difficulty getting the CD&Sim Loop to function the way they needed it to. My recommendation, if you run into any complications as well, is to look through some of these resources.

 

Tutorial: Getting Started with Simulation - I recommend this tutorial to start. It will walk you through understanding/using simulation practices in LabVIEW.

http://zone.ni.com/reference/en-XX/help/371894G-01/lvsimhowto/sim_h_gs/

 

Control Design & Simulation User Manual - This is a very robust document but contains a lot of good information. I would use this as a reference if you're looking for more specific information on a topic.

http://www.ni.com/pdf/manuals/371057g.pdf

 

In the end, if you have specific questions about your problem, you should probably make a new post and refer back to this post (As Zach-H mentioned).

Tim A.
0 Kudos
Message 10 of 11
(4,117 Views)