Doubt on transfer function.vi

Hi..
I have been trying to figure out the exact working of the transfer function.vi.. i guess it would help me estimate the model of a temperature control system online as it is working.. i mean by giving in the input to the process as the stimulus and its output as the response to the transfer function.vi...my final goal is to implement a 'process model estimator'.. will i be able to do it with the transferfunction.vi? i am trying to find out the transfer function so that i can use it in an adaptive mechanism to tune a PID controller online..
NB: i only have Labview7express :-)
eagerly waiting ...

It is difficult to tell what you are doing wrong without seeing any code, but if you use the build xy graph express VI, you need to uncheck "clear data between calls".
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • How to implement the Transfer Function in Real Time VIs?

    Hi all,
    I'm relatively new to Labview Real Time modoule and want to implement one Controller(not PID one) in Deterministic Loop! I have already designed discrete Transfer Function and searching for the way to build one Controller with it! Is it right to use the Simulation Loop instead of Timed Loop (in this case Deterministic loop) and implement the controller in it?! If it's correct so, should I use the same clock and Priod as Timed Loop?!
    It would be very helpful, if there is an Example about using transfer function in Real Time Loops!
    thanks for your help,
    Mohsen 

    Hello mhmdi,
    Sorry I can't open your VI (looks like it is a new version of LV than I have installed).
    You're right - you don't need to convert to a difference equation if you have the CD&SIM Module which can take discrete time transfer functions directly. You don't need shift registers with this function, as it is effectively done internally. If you don't have CD&SIM discrete TF's can be implemented easily just in a timed (or while) loop with feedback nodes or shift registers to replicate each z-1 you need.
    Some more ideas:
    There are many configuration parameters and options with the Discrete TF VI - which you need to understand for your application and make sure are correct. Sometimes implementing in a basic form (timed loop and shift registers) allows you to see what is happening without any confusing options you might not need.
    Are you using the Discrete TF VI in a Simulation Loop ? You might need to think if the loop being used is appropriate for a Real Time application. Maybe the timing of the TF, the loop and the DAQmx data are not all suitable for each other.
     I'm not familar with DAQmx, so not sure about any specific real-time aspetcs of that.
    "if the sample frequency of the discrete transfer function in the timed-loop is at multiple integers of the sampling rate (e.g. 12000 Hz for tranfer function and 4000 Hz for sampling rate, 12000=3*4000), would it somehow improve the resolution of the controller command?"
    This could actually make things worse - but depends on your transfer function if it is a problem. Think about it this way - in the scenario you state the input signal going into the Discrete TF will only change once in every three samples, that means if your transfer function includes a 1-z^(-1) factor (i.e. a derivative) - that will be zero for two samples then jump up for the next sample. You'll observe a very jittery/noisy signal, but the noise is due to samples not being correct. This will also occur if the sample times are very similar but go in and out of sync where you may get the occassional sample that is the same and hence the occassional zero in the TF.
    In an application I had we had problems trying to get the data coming into a timed loop and the timed loop itself synchronise, and before it was fixed the control signal was very jittery.
    Consultant Control Engineer
    www-isc-ltd.com

  • How to use Fuzzy Logic Controller for transfer function in labview control and simulation loop?

    I am facing problem with fuzzy PD logic controller for transfer function in control and simulation loop.
    Plz Help me in this regard...................
    i have attache snapshot of my program
    Attachments:
    fuzzy in simulation loop.JPG ‏52 KB

    Hi Sankhadip,
    Sorry for the late response. I was looking at your code and
    I noticed that the graph scale does not start from zero. That might be the
    reason why you don't see the transient in the simulation. To change the scales
    simply double click on the lower limit and set it to zero. If this is not the
    expected results, can you please post the expected results, so we can see what are the
    differences between the results . Also, you might be using different
    solvers, and that gives different results as well.    
    Thanks and have a great day.
    Esmail Hamdan | Applications Engineering | National
    Instruments

  • Transfer functions imported from Simulink through MIT not working in Labview

    Hi,
    I am just starting to use Labview interface with Simulink using Model Interface Toolkit (MIT). I am trying to import an integrater model from simulink. The model is very simple. An input port connected to an output port through an integrator model (1/s). Here are the steps I used:
    1. Build the model in Simulink.
    2. Add the NI input-output ports to the model and place the NIVeriStandSignal Probe in the model.
    3. Generate the dll using NiVeriStand.tlc as the target file option.
    4. Import that dll into Labview using Load Model.vi. Follow the steps given in the example file for importing the input/ output ports info along with the timing info.
    5. Then use a numeric control to input value to the integrator dll and pass the output from dll to a waveform chart.
    But when I run the labview VI, the output in the chart is always zero. What could be the possible reason? Please let me know if I am making any mistake in the process?
    I have used Fixed time step with ode4 (Runge-Kutta) as the solver options in Simulink during dll generation. I am using Labview 2014 and Matlab R2014a.
    I have found the issue to occur only when I use any transfer functions or Plecs circuit with inductors or capacitors in my Simulink model. But when I use simulink model with only constant or maths functions like add, subtract etc, this process works and gives me the correct result in Labview.
    Any help would be appreciated.
    Thanks.

    Hello Sachin_Madhu,
    Can you build example programs with a solver included? Does the model work in The MathWorks, Inc. Simulink® Software without tying into LabVIEW? It is important that when you built the model you followed the four steps listed in this help file:
    http://zone.ni.com/reference/en-XX/help/374160A-01​/vsmithelp/mit_convert_model_to_dll/
    MATLAB®, Simulink®, and Real-Time Workshop® are registered trademarks of The MathWorks, Inc. Other product and company names listed are trademarks and trade names of their respective companies.
    Siana A.
    Application Engineering
    National Instruments

  • How to create a filter using mathscript transfer function in labview

    Dear all,
    I am currently designing a filter in labview using a Mathscript looping. The filter can be represented in transfer function. I have attachted the transfer function equation together with its value and the desire frequency vs. amplitude graph that I should obtained from it. Also, following are the transfer function written in Matlab.
    B1= tf ([57.5221845],[1 51.017077 205.1868]);
    B2 = tf ([1 0],[7.6991]);
    B3 = tf ([1 0],[14.32433403]);
    B4 = tf ([1 0],[137.6017]);
    F = B1 * ( (1+B3)/((1+B2)*(1+B4)));
    plot(F)
    I have also modify the coding as Labview Mathscript does not support the Matlab coding "tf" as transfer function to "bilinear"
    Problem I am facing are:
    1) Unable to display the graph of the filter in labvie.
    2) Unable to have sinewave as an input to the filter.
    3) The output cannot be display in graph format. 
    Hope to have the soonest reply from you guys. Many thanks in advance 
    Solved!
    Go to Solution.
    Attachments:
    transfer function.jpg ‏18 KB
    Weighting Filter.vi ‏266 KB

    Thank you again for offering to help me in writing the code.
    I suppose that I should do a frequency sweep on the transfer
    function to prove that it behave as the sample graph. Example, if I have an input sine
    wave with the frequency of 8.8Hz passing through the transfer function filter, the
    output that I should be getting is 1 according to the transfer function graph
    and of cause the frequency range of my input sine wave would only be between
    the ranges of 0.5 Hz to 30 Hz.
    Attachments:
    Weighting FilterTest1.vi ‏53 KB

  • Transfer Function Block Component not working properly

    When using a Transfer Function Block, and you enter in the polynomial coefficients for a simple RC Passive Low-Pass Circuit, and perform an AC analysis side-by-side to its circuit equivalent, it works great.  The 2 frequency response waveforms are identical.  However, when you add another RC Low-Pass section in cascade with the 1st one, making it a 2-pole RC Passive Low-Pass Circuit, and you put its polynomial coefficients into the transfer function block the results of the AC Frequency Response is not identical to its 2-pole circuit equivalent.  I double checked my math to make sure my transfer function math was correct.  Since 2 transfer functions are in cascade, the transfer function from the 1st RC stage is multiplied times the transfer function of the 2nd RC stage, and the result is the overall transfer function.  I even went as far as creating 2 transfer function blocks, each of them, with a single RC transfer function and connecting them in a cascade fashion.  The results were the same....the trasnfer function block(s) do not resemble their circuit equivalent models for a >=2pole Passive RC Low-Pass filter.

    The transfer function of a RC ist not retroactively-free, this is the reason why the transfer function of 2 RC Circuits is not 1 / (1 + RC*s)^2 ! You can not multiply the one function of one RC with the other!
    You have to solve the differential equation of the RC circuits, to get the real transfer function.

  • The transfer function of the PID block doesn't show the derivator.

    Hello,
    I am trying to use the PID vi, but I when I try the box by itself, it doesn't behave as a "clasic" PID should behave. The main problem is that I don't manage to see the derivator. In the attached vi I compare the transfer function of the PID vi with the transfer function of a PID built by me. My version shows all what a PID should have: integral section (with decreasing magnitude and -90 phase), center area (with constant magnitude and 0 phase), and derivative area (with increasing magnitude and +90 phase).
    The PID vi only shows the integral part.
    You can also select a step input, and see the output directly. If you choose a large enough derivative time (100 times bigger than the integrator time), and you look closely to the first part of the output, you will see the pick due to the derivator in my version, but not in the PID.vi version.
    Does anyone knows what am I doing wrong? 
    Kind regards,
    Pablo Estevez
    Solved!
    Go to Solution.
    Attachments:
    TestPID.vi ‏31 KB

    Dear Nathand,
    Thanks for your answer, I tried the change and you are right. That shows that this not a standard PID, since that means (and actually I can see it now by checking inside the vi) that it is not using the derivative of the error but the derivative of the process variable. I know that this is used sometimes to prevent the effect of fast changing set-points, but it is a shame that they do not comment on it in the help, and that this is not a selectable feature. Do you know if there is a way to edit these pre-packaged vi's? 
    One more question, about the labview style. I included the sequences just to group terms and make the code more readable to separate the integrator from the derivator and not have a knot of entangled signals. Specially when I run the clean-up diagram, it gets very entangled. I have been looking for another way to do that (container boxes, groups). It would be nice if you could suggest me something I can do for it.
    Thanks again,
    Pablo 

  • System Identification and Transfer Function of the LEGO MINDSTORM NXT Robot

    Can anybody please help with the below question.
    Using your LabView interface, input different values of power and record the output value of the number of wheel rotations. You can convert the latter into speed by measuring the diameter of the wheel. Then, type ‘ident’ in the command line of Matlab to launch a graphical user interface for system identification. Using the data collected for input power and recorded speed, you can derive the transfer function for your robot in the Laplace domain.
    You will notice that it is possible to approximate the transfer function to a first order system.
    Add disturbance to your system such as wind drag, road profile or friction. You might want to model the disturbance as a sinusoidal waveform.
    Analyse the system response in LabView in order to tune the response.
    Finally, write a LabView program to test your controller.
    Set both Integral and Derivative to 0
    Increase the value for Proportional controller to 0.5, 0.8, 1, 1.1, 1.3, and 1.5
    Select a suitable simulation stop time.
    Compare each simulation results and draw some conclusions.
    Record the steady-state error. Has it dropped to near zero?
    Record the rise time. Has it decreased to less than 0.5 second? And for what values of Kp?
    Check whether this response is realistic i.e. a real cruise control system generally cannot change the speed of the vehicle from 0 to 10m/s in less than 0.5 second.
    Adjust the gain (Kp) to give a reasonable rise time and add an integral controller to eliminate the steady-state error.
    Change both Kp and Ki and see what happens to the response. When you adjust the integral gain Ki, start with a small value since a large Ki can destabilise the response. (Ki =0.001, 0.002, 0.003, 0.004).
    Then you need to adjust both the proportional gain Kp and the integral gain Ki to obtain the desired response. Record the values of Kp and Ki that can meet all the design criteria.
    Write the PID-feedback control LabVIEW program as described above.
    Does it work? Quantify! Show us it is working
    Hand in a short report on the PID project on the cruise control of the LEGO MINDSTORM NXT Robot. Your report should contain an introduction to cruise control and uses of PID controllers, a brief explanation of how PID feedback control works. The printout of the Block Diagram and Front Panel of your LabVIEW program should be attached at the end of your report.
    Put it all together. There are many questions that can be explored and written up in the result section. Be creative.
    Here are some things that may be addressed: Check whether your system can stabilise speed to within 1%. What are the optimal PID parameters that you have found? Can you choose PID parameters to both reach the set speed quickly and also maintain the speed within good accuracy once the system has reached the set speed? Can you control the speed of small steps? Explain your results?

    Thanks for that.
    DanHarryman wrote:
    HI ToolMonkey
    You should be able to build control system to do this using PID control VIs. The following paper is a good place to start when working with PID systems. 
    http://www.ni.com/white-paper/6440/en
    Let me know how you get on using some of the functions in this. 
    Thanks 
    Dan.H
    UKAE

  • Units of transfer functions

    Hi
    I want to implement a first order model using the simulation module of LabVIEW. I'm using a fixed step ODE solver with step size of 0.1s and I have set the simulation loop period equal to the step size (100ms). Do transfer functions have a predefined unit for the value of time constant: s, ms?
    Thanks
    Solved!
    Go to Solution.

    There are numeruous ways to derive a transfer function. Are you implementing a continuous or discrete transfer function? I'm guessing you are using a discrete transfer function. Inside a simulation loop, that block has two time-related parameters, sample period and sample skew, which are both clearly defined as seconds. Does this answer your question? If not, I'll need more info on what you are doing.

  • Transfer function + controller + Bode plot and root locus

    Hi
    I am trying to plot Bode plot and root locus for trasfer function
    TF = 1/(s^4 + 2s^2)
    Then I want to implement Ideal compensators (PI , PD or PID) or lag/lead compensator to get the required stability
    I am trying to do this Labview 8.o in control design and simulation loop. (V2.0)
    I have done some simulation but I am not understanding as to how implement controller on this.
    I need little help.
    I am attaching my VI. but you will find rootlocus not there and feed back loop control to implement controllers not there
    Thankyou

    I have one typical controlers question where I am using feedback control
    alongwith compensators. My transfer function is like fourth order
    TF = 1/S^2(S^2+2)
    but  rootlocus and transfer function in labview  do not let me write equation more than 3rd order.
    How can I write this 4th order equation.
    Next I want to make one feedback control on this transfer function and then want to plot bode and rootlocus.
    I have made one vi of fourth order by placing transfer function in series and then for feedback gain I have placed another transfer function with feedback. I have also attached rootlocus vi but it does not show me rootlocus since rootlocus Vi can not take more than fourth order transfer function.
    I want to plot my step response, bode, and root locus for step input
    I have also tried to  make another VI with tansfer function VI which has feed back terminal in it, but I donot know how to get bode and rootlocus out of that.
    I am attaching my both VIs for you.
    see my two Vis please.
    Attachments:
    Bode_practice.zip ‏156 KB

  • S-domain transfer function

    I am trying to recreate my partners Matlab filter in Labview whereby a sine wave goes through a low pass filter. I am using a sinewave array as the input and am trying to impose the s-domain low-pass transfer function s/(1+sT) on the wave as is done in Matlab. Can a formula node from matlab be pulled into Labview.
    Thanks
    kilyg

    Hello.
    It is possible to execute Matlab code in LaVIEW, if you have both LabVIEW and MATLAB installed in the computer. You have to use a "Matlab Script" node found in Functions >> Analyze >> Mathematics >> Formula.
    However, I recommend using LabVIEW native functions, unless it is absolutely necessary to use MATLAB, because whenever I have had to interface to MATLAB, I have found, that error reporting is very bad. For example, if you use an undeclared variable in MATLAB, it immediately tells you there is an error. But when you use the MATLAB script node it does not, so, debugging is a pain. You have to make sure your Matlab code is error-free.
    To use that Matlab script node, you have to right-click on the edge of it, and create inputs and outputs, and give them the exact same name as the variables you will use inside in the Matlab code.
    One possible solution for this particular application in which you want to apply a simple filter, is to use the "Filter" VI, found in Functions >> Analyze >> Waveform Conditioning. You can set it to low-pass filter, and set the cut-off frequency, and stuff like that. (I am using LabVIEW 7.1, so if you have an older version, I am not sure if you have that VI available, especially if it is older than 7.0).
    I do recall seeing a VI in which you could directly specify a transfer function, like what you want to do, but I could not find it. Perhaps it is because I do not have the control design toolkit installed, and it was part of that, but I will keep looking and let you know if I find it.
    Good luck.
    Alejandro

  • Transfer Function (s-domain)

    Hello,
    I'm not sure that my previous message made it, so here goes again...
    I am trying to implement special analog filters in Labview that are
    specified by s-domain transfer functions. The only way I can think of
    to do it is to do a bilinear transformation from the s to z-domain and
    use an IIR filter. But this raises a number of other questions such as
    pre-warping frequency (is it needed, which freq. to choose)and what
    error, if any, is involved in this process.
    Has anyone been successful with accomplishing this through any method?
    Thanks in advance,
    David DeLoach
    Sent via Deja.com http://www.deja.com/
    Share what you know. Learn what you don't.

    wrote in message news:[email protected]...
    > Hello,
    >
    > I'm not sure that my previous message made it, so here goes again...
    >
    > I am trying to implement special analog filters in Labview that are
    > specified by s-domain transfer functions. The only way I can think of
    > to do it is to do a bilinear transformation from the s to z-domain and
    > use an IIR filter. But this raises a number of other questions such as
    > pre-warping frequency (is it needed, which freq. to choose)and what
    > error, if any, is involved in this process.
    >
    > Has anyone been successful with accomplishing this through any method?
    >
    > Thanks in advance,
    >
    > David DeLoach
    Hi
    Do you want an off-line filter or an on-line filter? Off-line filtering
    functions are available in an "advanced installation" of LV (if I remember
    right) and in Signal Processing Toolset. Off-line filters handle *given*
    time-series. If you want an on-line filter, which calculates a new filter
    output as soon as a new filter input is ready (the input may be a newly
    sampled signal some discretization method (as bilinear transformation) and
    implementation using a while-loop is a solution, as you suggest. (However,
    the Signal Processing Toolset also contains such on-line functions, if I am
    reading the NI Catalogue correctly.) An on-line algorithm can of course be
    used off-line, too (the new input sample is then the new value fetched from
    the existing time-series).
    Assuming you want to implement the filter yourself (with while-loop and some
    discr. method): If there are no significant signal frequencies above
    approximately 0.2 * Nyquist frequency (in other words: if the sampling
    frequency is sufficiently high), you should not have to bother about
    prewarping (i.e. you do not have to adjust the filtering coefficients for
    prewarping), and you may even develop the filter algorithm using the simple
    Euler forward method for discretization (I have done this in several
    projects, and it works fine). Theory for designing/analysing prewarping can
    be found in for example Franklin and Powell: Digital Control of Dynamic
    Systems, and in most Signal Processing textbooks. Prewarping is particularly
    important for filters with "critical" specifications, for example
    notch-filters where one well defined frequency component is to be removed.
    With respect to the while-loop implementation, if you want to keep the block
    diagram well-structured and with good overview, you may write a SubVI for
    the filter (with connectors for input and output and filter parameters), and
    use this SubVI in the (main) while-loop. Within the SubVI, the previous
    filter variables (needed in the filter algorithm) are stored using local
    variables rather than using a shift register (as I found it easier to
    implement re-setting the filter variables (to initial values) when using
    local variables than when using shift register).
    Regards,
    Finn Haugen
    Telemark College, Norway

  • Transfer Function with CVI 5.0

    Dear Sir/Madam,
    Let me first introduce myself. I am a Telecomunication Engineering student
    from Spain workimg on a project based on Labwindows/CVI and the data adquisitionscard
    PCI 6024E.
    In this project I have to calculate the transfer function of a network
    under test, and I would like to display the amplitude and phase in frecuency.
    I just got to display the window spectrum so far (mainlobe and sidelobes),
    and I would like to display the amplitude and phase spectrum as a Bode Diagram.
    To develope this project I am using the Advanced Analisys Library and the
    function Transfer Function.
    I would really appreciate your help in the following matters:
    a) How can I display the transfer function as a Bode Diagram?
    b) What
    stimulus do I have to generate for a band width (2KHz)?
    c) What window do I have to use?
    I am grateful for your attencion and I will be working forward to hearing
    from you.
    I would also appreciate if you could send me an application example.
    Yours sincerely .
    Carlos Gutierrez Castellano
    e-mail:[email protected]

    Do a web serch for TVichw32, it's a small DLL/VXD the you can compile easily
    for CVI that does just that (I use v2.0).
    Guillaume Dargaud
    CNR/IFA
    http://sung3.ifsi.rm.cnr.it/~dargaud/
    http://sung3.ifsi.rm.cnr.it/~domec/
    http://sung3.ifsi.rm.cnr.it/~chooyu/
    "The church is near, but the road is icy. The bar is far, but we will walk
    carefully." - Russian Proverb.

  • What does it mean when it says transfer function normalized

    I am running my VI which is control system model. I have changed transfer function into a cluster of Numerator and Denominator and through a cluster unbudle into transfer function subVI. It does not show any fault until I run it and then it shows message "Transfer function normalized" what could be the problem. I will try and attach the vi. The Vi is created in GSim Tool set

    This error is because the order of your numerator is higher than the order of the denominator of your transfer function. This is an impossible physical situation and leads to a delta function and its derivatives in the output response. Physically realizable systems must have the order of the denominator in the transfer function greater than the order of the numerator.
    Marc

  • Remote opportunity, Looking for assistance in programming a transfer function model

     Hello,
    Please see attached transfer function model. I am looking for assistance in programming in Labview 2014. Inputs are coming through cRIO and into the model and the model is determining the value of certain outputs being sent back to the cRIO, please PM if you are interested and we can discuss in more detail. Thanks!
     

    Hello,
    I could help as I've done this sort of thing for many of my clients. Let me know what you would like done.
    Thanks.

Maybe you are looking for