Control&Simulation - CD Draw Transfer Function Equation - update issue

Hi!
At initial start - the front panel looks like this below.
When I run the application - sweep for certain values, then the front panel shows this -
Equation is drawn with the second to last value and not with the last one ?!
If the application is repeated - then the front panel shows following results
Anyone could help me please ?!
Than!
Vasco
Solved!
Go to Solution.
Attachments:
Forum-question-equation-draft-1.vi ‏292 KB

Vasco,
On your code, you have the top part of the "Variables" calculation in parallel to the the simulation and you are connecting the wires with a 'local variable'. However, in dataflow, there is no guarantee that the top part will be running first than the second part. So, your local variable is not up to date to the last iteration.
To fix this, remove the local variable and wire from the "Variables" control to the "CD Construct Transfer Function Model.vi". This should guarantee that the top part of our code is executed before the simulation and using the correct values.
Please let me know if that works for you...
Barp - Control and Simulation Group - LabVIEW R&D - National Instruments

Similar Messages

  • Specifying the numerator and denominato​r of the transfer function equation

    hi
    I am going to simulate the second odder problem. But I have problem when I try to define the 2nd odder transfer function
    by using externally. I have attached the VI in this mail .
    any information in this regard highly appreciated 
    thanking you 
    danushka 
    Solved!
    Go to Solution.
    Attachments:
    second_order_systerm_8.2.vi ‏80 KB

    Hello Danushka,
    You would need to create a control from the transfer function. Then on the front panel, just expand the denominator column to get zero and first order for the denominator as shown here. Let me know if this helps.
    Andy Chang
    National Instruments
    LabVIEW Control Design and Simulation

  • 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

  • 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

  • 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

  • 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

  • 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

  • Verify transfer function

    i use the transfer function.vi from the control toolkit to generate a transfer function (0.0133s+1)/(0.0076s+1)
    from the examples i have seen the array for the numberator and denominator should be 1, 0.0133 and 1, 0.0076 respectively.
    however i cant get the output I want until i switch the values to 0.0133,1 and 0.0076,1 as shown in the attached figure.
    can someone verify in which order should the numberator and denominator be?in ascending order or descending order of s?
    Attachments:
    transfer function.jpg ‏41 KB

    Hi,
    Before I answer, let me review something here, so we are talking the same thing. To be able to simulate continuous systems in a computer, we use differential equation solvers that numerically try to come with a solution for the equation. These techniques are easily encounter in the literature, but, in general you would see solvers that are fixed step size, as Runge-Kutta 1 (Euler) which is a single-step explicit
    Runge-Kutta ODE solver of first order, or variable step size, as Runge-Kutta 45 which is a single-step explicit Runge-Kutta ODE solver of fifth order, which uses the Dormand-Prince coefficients.
    In Simulink, you don't need to specify dT because it uses an algorithm to identify those coefficients "auto". Also, they have the variable step size as defaut. In the case of the Advanced Control Vis, those are VIs that are ONLY based on the Runge-Kutta 1 (Euler) Integrator, and it needs also the dT, since it does not calculate this parameter for you.
    The best guess for dT CAN NOT be only twice the sampling time, because the Euler Integrator will only have 1 point to calculate the derivative and if try to apply a signal with sharp corners, must probably you will be unstable. The dT must by much higher (than the dynamic of the system and, in general, 10 times is good enough.
    If you are really looking to simulate dynamic system in LabVIEW, you should look into the Simulation Module. It allows similar functionality as Simulink and also allows you to choose Variable Step size for the integrator. Look into: http://www.ni.com/realtime/control_design.htm OR http://sine.ni.com/apps/we/nioc.vp?cid=13852〈=US for more information about this and other new tools for Control Design and Simulation in LabVIEW.
    Hope this help. If not, fill free to reply back.
    Barp - Control and Simulation Group - LabVIEW R&D - National Instruments

  • Process Control Simulator

    I would like to build Process Control Simulator Virtual for my University. I know LABVIEW has an example PID Control Level, In these example I see the level is moving (going up and going down ) I want to do some similar with feedback control, feedfoward control and cascada PID control, I mean level going up an going down, parametres Kp, Ti and Td, Graphips (manipulated variable vs. controlled variable), Controller in manual mode and automatic mode. I´ve read that I can do that with LABVIEW SIMULATOR MODULE but I don´t have experiencee using LABVIEW. I have Transfers Functions but I don´t know how begin. I will show you the first project I want to do.
    Thanks for all you support you are going to give me
    Best Regards
    Tomas Cabrera
    Venezuela
    email: [email protected]
    Attachments:
    Virtual Process Control Simulator.jpg ‏27 KB

    Hola Thomas,
    I also want to let you know that the simulation you are trying to do would be much easier if you have the Simulation Module and the Control Design Toolkit. They are add-on to LabVIEW that allow you to do transfer functions and continuous simulation easily. For more information, you can try:
    http://www.ni.com/labview/embeddedcontrol/simulation.htm
    Please let me know if we can help you more to understand those products.
    Barp - Control and Simulation Group - LabVIEW R&D - National Instruments

  • Transfer functions in the 64 bit version of Labview 2011

    Hallo all,
    I am running a 64 bit version of Labview 2011 and I would like to know is it possible to use transfer functions in this version?
    I found only a 32 bit version of Control Design and Simulation Toolkit, is there something else I could use for this?
    Thank you,
    Vladimir

    Hello,
    Thanks for your posting in this forum. Unfortunately you cannot use this function in the LabVIEW x64. You can check the link below
    http://forums.ni.com/t5/LabVIEW/LabVIEW-64-bit-support-for-modules-and-toolkits/td-p/996044/page/2
    But you can try the option below, but I cannot say that it would work.
    You can install the LabVIEW x32 and then Control Design & Simulation Module .
    Then copy the library of this module somewhere else.
    Then you can install the LabVIEW x64 and copy that library in its folder.
    Maybe it works.
    Regards,
    Hossein

  • Cascade control simulation

    Dear Sirs
    I am interested in developing a cascade control simulation in LabVIEW 8.2  using LabVIEW Simulation Module. I have developed a program that I have sent you. Do you tell me if the program is good implemented?. How I should tune the primary and secundary loops?(I don`t know how should be the conections in order to tune each loop). Excercises could be great!.
    Adittional data
    Process transfer function is determinated usig Step Test
    Controller parameters are obteined using Ziegler Nichols Method
    Best Regards
    Attachments:
    control en cascada.vi ‏638 KB

    Hi Pablo,
    I'm sorry for attached 8.6. Follow attached the VI saved for version 8.2, and about reference  Control Systems Engineering, by Norman S. Nise Cap. 9. Another interesting reference, but I think it is not exactly  you are finding is Modern Control Engineering, by Katsuhiko Ogata Section 10.5.
    Happy new year!
    Regards,
    Message Edited by Osvaldo Santos on 12-29-2008 09:48 AM
    Osvaldo Santos
    Attachments:
    Filtered Noise.zip ‏30 KB
    Block Diagram.GIF ‏15 KB

  • Numeric Operations with transfer functions

    Dear Friends,
           I am relatively new to labview and i am using labview 8.2. I wanted to know that how can i perform a numeric operation between an array and a transfer function. I am attaching a sample of what I have been able to do, but the output is in the waveform pattern. Can anyone suggest a better way to perform this operations. Any suggestions will be of great help.
    Thank you.
    Shashank

    Shank,
    What is the operation that you are trying to do with Control Design? It is not very clear what the fnal goal. There are several ways to do things with LabVIEW that would be more suited for your final problem.
    Just to let you know, as of LabVIEW 8.5, we introduced basic operations of models (that can be in State-Space, Transfer Function and ZPK). So, you can multiply a scalar value by a Transfer Functions model, giving a transfer function scaled back. Before, you would need to do operations with that.
    Additional to this, also consider using Simulation Module 8.2 for changing the paramters on the fly. I noticed that you are trying to use the Simulation Signal Express VI and try to simulate the transfer function on the fly. This is EXACTLY what you can do with Simulation Module, but in a more natural way. If you have LabVIEW 8.5, the Control Design Toolkit and the Simulation Module are part of the same product called Control Design and Simulation Module 8.5.
    Hope this helps. Let me know if I can of more assistance!
    Barp - Control and Simulation Group - LabVIEW R&D - National Instruments

  • Help on Discrete Transfer Function Direct VI

    I want to make use of Discrete Transfer Function Direct VI of FPGA in my program. In order to make it function correctly, I use the Discrete Transfer Function Direct VI to realize a discrete integrator. The function of continuous integrator is 1/s, while the z-transform of 1/s is z/(z-1). A Discrete FP Transfer Function to TXP was used and the Numerator and Denominator were set to [0 1] and [-1 1], respectively. But the output of Discrete Transfer Function Direct VI is always 0.
    I think there would be somthing wrong when I program the Discrete Transfer Function Direct. Can anyone here help me check the problem? Thank you.
    Attachments are my program, in which DiscreteTF-RT.vi is RT program, DiscreteTF-FPGA is FPGA program.
    Attachments:
    DiscreteTF-RT.vi ‏583 KB
    DiscreteTF-FPGA.vi ‏10 KB

    Steve, thank you for your reply.
    I follow your advice, and add a 'Loop Timer' in the while loop of FPGA, a 'Time Delay' in the Control & Simulation Loop in RT with 0.05s delays. Actually, through adjust the Count input of 'Loop Timer', the output of H(z) could be slowed down. But, it seems that the H(z) output is sensitive to the value of Count input. I try different values for the input, but still can't find the right one.
    Do you have any other comments? Can you take a look at my programs, or help me correct my problem? Best wishes.
    Attachments:
    DiscreteTF-FPGA.vi ‏20 KB
    DiscreteTF-RT.vi ‏633 KB

  • Help Please : How to determine transfer function from two signals?

    Hello,
    I am an intern in a research center and to do my experiment I need to use Labview. I have already managed to make VI for the signal generation and the aquisition data. But now I have to identify the transfer functin from the stimulus signal and the response signal. I would like to display the Bode diagramme and to identify thr transfer function itself.
    It is quiet urgent I have to to this by the end f the week.
    Sorry for my bad english...
    Thank you for any help
    Eva comble

    The questions in this thread are really regarding System Identification. The only way to do this is using the System Identification Toolkit. LabVIEW by itself cannot do this. Once the model (transfer function, state space, etc..) has been acquired through the use of this tool, more complex design and simulation processes can be done using the Control Design and Simulation Module
    Eli S.
    National Instruments
    Applications Engineer

  • 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

Maybe you are looking for

  • I want to expend base member for year.total parameter passed from pacakage

    Hi All, I am passing an Year.Total parameter from DM Package into my script logic. I need to calculate revenue for the whole year which has been passed on. But I dont know how to handle this parameter(year.total) in my script logic. I want to calcula

  • INDEX and DML

    Hello every one, I have may be crazy question but i am confused. 1. Does indexes store the data of column in the database other then the base table or refernces to table? Plesae make my doubt clear. I read th doc already. 2.When we do DML on table, d

  • How to store microsoft docs on my mac icloud

    i would like to store my microsoft documents from my Mac held in my stack files on to my iCloud as way of backing up these files. I have opened the icloud but do not seem to be able to see any documents in the cloud or copy my documents in to the icl

  • Discoverer 4i Viewer Freezes

    I am having trouble logging into discoverer with one specific client machine. All others work. This client seems to lock up when waiting for the 'connect to database' box. Has anyone had this type of problem? Are there hardware requirements for the c

  • What is wrong with this?

    I am trying to make a program that does simple binary operations, it is not working. I think I am missing some constructors, but don't know what they are. Any help would be appreciated. //Expression.java package Math; public abstract class Expression