Multiple Input Multiple Output Fuzzy Logic Controller

I am designing an autotuning PID temperature control system whose PID gains are adjusted using a Multiple Input Multiple Output (MIMO) Fuzzy Controller. I am unsure how to set up specific inputs and how to use specific outputs when there are multiple inputs and outputs. Specifically, my Fuzzy system has two inputs and three outputs.
For the input, I have two 1D arrays of scalars (doubles) which I have used to build an array and concatanated the inputs to the array. How do I configure which values of this array are used as each specific input value to the fuzzy system?
Similarly, for the output, the fuzzy system gives three output values which are used as the PID gains. How do I configure these such that they are in the right order to be used as the PID Gains of the PID VI?

Hi natsmi,
You can find some examples by navigating to:
C:\Program Files (x86)\National Instruments\LabVIEW XXXX\examples\control\fuzzy
Some of them are at least MISO systems and might be helpful to clarify some ideas. You can also find them using the Example Finder from LabVIEW (By going to help on the top menu, and then Find Examples). There you can go to the search tab on the left and type in fuzzy.
Hope this helps.
Regards,
AGJ

Similar Messages

  • How do I create an xControl with multiple inputs and outputs?

    Hello,
    i am trying to write a new Xcontrol Element. In the data model I can create data types using the cluster to create compound types, eg an int and an int array. But how do I create an xcontrol which has multiple data inputs and outputs?
    Kind Regards

    Limping_Twerp wrote:
    Alright: I see: An xcontrol is either an input OR an output. How do I achieve an output? Secondly: So you are saying the only Elements that can have multiple inputs and outputs are VIs?
    Can you take a few steps back and explain what you are actually trying to do. SubVIs and Xcontrols have nothing in common and it is not clear why you even try to compare them side by side (e.g. in terms of the number of connectors).
    Your questions about input or output tell us that you seems to have some misconceptions about xcontrols. Xcontrols are like regular controls, except they have some built-in intelligence that you can program. Most front panel object can be either controls or indicators and the same is true for Xcontrol. You create an Xcontrol, and after placing it on the front panel you can decide if it should be a control (where the code reads the value) or an indicator (were the code writes values to it). When you define the xcontrol facade, you also need to program how the visuals change if it is changed from control to indicator or vice versa.
    As a first step, you should opend the example finder and look at some xcontrol examples.
    Again, what are you actually trying to do? 
    LabVIEW Champion . Do more with less code and in less time .

  • Multiple inputs and outputs using DAQmx VIs

    Hello,
    I am fairly new with the LabView programming language.  I have a few training books that I have been reading, and I have been following online tutorials and reading the forums.  However, I have come to a problem where I don’t see a clear solution.  I am using LabView 2009 (9.0f3) and DAQmx VIs.
    I am using a NI 9172 chassis PLC, with two 9201 AI cards, 9217 AI RTD card, 9472 DO card, 9263 AO card, and two 9237 AI Bridge cards.
    I am reading eight analog inputs with the 9201 cards, two analog RTD inputs with the 9217 card, three digital outputs with the 9472 card, three analog outputs with the 9263, and eight analog inputs with the 9237 cards.
    I wrote a simple program to test one digital output task, two of the analog output tasks, and a single analog input task.  I put all of them in the same while loop, and it worked perfectly.  However, when I add analog input tasks to the same loop, I get an error 200022.    So I tested each sensor individually by changing the channel before each run.  I searched error 200022 and found that this is because I cannot start another analog input task until the previous one ends.  With this said, I don’t know how to acquire an analog voltage in the same task as an analog RTD voltage.  Both inputs take different constants in the start task DAQmx icon.
    Attached is my test program.  It is titled “Test All”. This is the program I used to test the various sensors.  I tested the input sensors one at a time, and it worked fine.  A few tasks are written just to test functionality, and will be added to later.  The data is only displayed on the screen.  I will add triggers and data write to disk functions later.  This program works now, but if I add more analog inputs, it will generate the 200022 error.
    Can someone show me how to correctly write the code for multiple inputs and outputs using DAQmx?  All training materials and tutorials I can find all show a single input or single output, not multiples of each.  Thanks for looking.
    -Randy
    Attachments:
    TestAll-NI.vi ‏32 KB

    Hi RandyC,
    The Knowledge Base article Using Different Types of DAQmx Global Channels in the Same Task goes into a little more depth of what Bryan is talking about, and it also includes some example code to help show what to do.
    Hope that helps,

  • Problem with Fuzzy Logic Controller Design window

    Hi,
    I'm designing a fuzzy inference system using the Fuzzy Logic Controller Design tool.
    But when I use up to 4 input variables, the Rule Editor window is out of center and I cannot see the left parts of the antecedents.
    See the attached picture.
    The visualization is not movable and resizing the window with system utilities does not give any results.
    Anyody can help me? Thanks!
    Attachments:
    Bug Fuzzy Controller Design.JPG ‏68 KB

    Hello all
    The PID and Fuzzy Logic Toolkit 2009 was completely redesigned.
    There are new API VIs and a more intuitive user interface for creating controllers.
    You can create MIMO controllers with unlimited inputs and outputs, and also modify the controller on-the-fly.
    Check it out the new features and let us know your needs on Fuzzy control.
    LabVIEW PID and Fuzzy Logic Toolkit User Manual
    Regards,
    Bruno Cesar
    National Instruments

  • Programmin​g fuzzy logic controller design

    Hi,
    please i am using fuzzy logic controller design. Inputs and outputs data are connected to an OPC server.
    My question is: could i access programmatically (in the vi ) to the fuzzy logic controller design to prevent to enter in it each time that i need to change values ?
    Samer,

    Hello all
    The PID and Fuzzy Logic Toolkit 2009 was completely redesigned.
    There are new API VIs and a more intuitive user interface for creating controllers.
    You can create MIMO controllers with unlimited inputs and outputs, and also modify the controller on-the-fly.
    Check it out the new features and let us know your needs on Fuzzy control.
    LabVIEW PID and Fuzzy Logic Toolkit User Manual
    Regards,
    Bruno Cesar
    National Instruments

  • Fuzzy logic controller

    Hi all,
    Anyone know how to insert/attach data input (from fuzzy system designer) to Fuzzy Logic Controller.?
    Thanks.
    Best regards,
    WC Leong.

    hello,
    could you please provide us an example code so we can check what exactly is the issue.
    thanks,
    Mark 

  • Fuzzy logic controller design

    Hi,
    Is it possible to configure the "Fuzzy Logic Controller Design" with sending a code in another language of programmation like C for exemple and without need to access each time using : Tools > Control Design and Simulation > Fuzzy Logic Controller Design  ?????????????????????????????????

    I assume you have 3 terms for each of your 3 parameters then, to get the 27 rules. If this is the case, going to the rule-base editor will bring up all 27 rules (the control designer automatically populates the rules list, so you don't even have to add additional rules to reach this number). Consequences, unlike rules however, are limited to 9. When I asked what you are using the controller before, perhaps I should have been more specific, as I was more curious as to whether or not you need singletons for your consequences? I am still having trouble imagining a situation where you need 27 *consequences*, unless perhaps they are singletons.
    That being said, I don't know of a way to use the fuzzy logic kit to create a controller with more than 9 consequences (27 rules are no problem). How familiar are you with the mathematics and principles behind the fuzzy logic controller? It's always possible to write your own code, and if you need any help, I'd be more than willing to help out.
    -Cory

  • Fuzzy logic controller for DC motor

    Hello guys!
    Can anyone help me out in giving inputs to fuzzy controller which has two input member function Error and Change in error. Is there any tool which can store the previous error and compare it with present error which gives the chane in error?

    Hello,
    Please look at the shipping example of Fuzzy Logic Toolkit in:
    C:\Program Files\National Instruments\LabVIEW 2010\examples\control\fuzzy\Tanks with PI control\FuzzyEx Tanks with PI control.vi
    This code will allow you to see how you can implement the error and rate error by using pure LabVIEW code. Now, if you have the Control Design and Simulation Module, this tool have functions that easily calculate the error and derivative for you.
    Hope this helps
    PS: Notice that this example is in LabVIEW 2010. The same example can be found also in 2009 by changing the number of the LabVIEW version on the path to 2009. Previous versions have this code, but they are a bit more difficult to understand. If you have previous version of LV 2009, I strongly recommend you to update to at least 2009 since on this version the toolkit was completely refactored. If you can't here is the location of the example previous to 2009:
    C:\Program Files\National Instruments\LabVIEW 8.6\examples\control\fuzzy\tanks.llb\Tanks - fuzzy control PI.vi
    Barp - Control and Simulation Group - LabVIEW R&D - National Instruments

  • 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

  • Analog Levels vs SPDIF Levels Input and Output in Logic Pro

    Hello,
    I ran a test last night for recording input and output levels from my Yamaha Motif XS8 through an Apogee Ensemble to compare Analog to SPDIF
    I connected two TRS cables from the L and R outputs on the Motif XS into the Analog Inputs on the Apogee and also have the SPDIF connection from the Motif to the Apogee.
    I put the master fader all the way up on the XS for the volume for analog.
    The ensemble in Maestro has a +4 and -10 reference notional level option for analog inputs. i had it at +4 but changed to -10 and the analog got louder (i figured it would get louder for +10, confusing).
    anyways, why is it that I can record louder levels for analog than the digital transfer?
    I tracked both options at the same time then recorded vocals over it. the digital sound is too low. what's up with that?
    and when I tried to bounce the recording to listen to it in ITunes, the volume levels were way lower than my cd playing through iTunes. Please enligthen me on these?
    I use to record in a Roland 2480, and had similar results with loudness, but got a little louder through mastering but still....pro cds are way louder and still clear.

    I think there is much confusion here!
    In summary, you wont be able to control the recording level of S/PDIF.
    The reason is that you don't want to!
    You need to think of the SPDIF connection as being more like a file transfer method. You are copying the digital data at an output to your harddrive in effect. If I send you an MP3 via email you'd never imagine that your email software is capable of changing the gain of the MP3 I send you. This might sound daft but its a useful analogy. If you need to increase the "volume" of that MP3 then you'd need to ask the sender. Its the same with your set-up.
    There could well be somewhere on your synth that adjusts the instruments level, other than the master (analogue) output control. For example, make sure the midi volume of the intrument being played is set to full - ie midi vol 128. Perhaps there is somesort of virtual mixer onboard to control all the muti-timbral parts so make sure your part has its virtual fader turned up.
    This is what (basically) is going on in the chain...
    Your synth creates sound in its "digital brain". This sound is sent to an "output stage" which will distribute the sound to various outputs. In the case of the S/PDIF it will just send the raw digital data untouched. For the analogue side the digital signal (same as the one sent to S/PDIF) will be converted to analogue and then sent to a amplifier to get it to an appropriate "line level". This final level could well be controlled by an anogue volume control which could be adding more gain (than you think) too.
    When things go to your sound card/ daw...
    The purpose of a analogue gain control is to set the i/p signal so that it suitably loud to beat any noise that exists in your input circuits - so that a good signal to noise ratio is achieved. Analogue signals need to work in the right loudness zone (so to speak) as the analogue electronics will be designed to handle signal levels of a particular range. the gain control is there to make sure the signal is in that range.
    Digital signals are far more predictable though and there is no advantage to your recordings if the incoming digital signal gets an increase of level at the input stage. All you are doing here is effectively adding a few zeros to the binary digital data!
    Lets face it the point of recording is to get a copy of the original sound, that is as similar to the original as possible. With S/PDIF you get a perfect copy of what's coming out of your synth - so job's a good un!
    If, when you come to mix in logic, you find the level of the digital recording is indeed too low for mixing/mastering purposes then just boost it in logic via a fader or via the gain plugin.
    Those referrence values of -10dBV and +4dBu refer to analogue voltage levels only. they have nothing to do with the digital domain. The -10/+4 switch will be only relevant to analogue inputs and outputs. Using an analogue VU meter you should find that a sine wave that peaks at 0dBVU (totally different to 0dBFS BTW) is the equivant of a digital sine wave peaking at -18dBFS.
    The analogue headroom (how loud you can go before things distort) depends on the analogue electronics and varies with different design. Analogue stuff, like mixers) often has headroom of 24dB or more. So that digital stuff can interface with analogue properly we allow for that analogue headroom to be around 18dB (usually enough in practise!)... hence -18dBFS(digital)=0dBVU(analogue).
    To make your digital and analogue input signals sound similar in level you will probably have to reduce the gain of the analogue input. If you set the incoming analogue signal to peak around -14dB (or less!) or so you will probably find things more equal. If you are working in 24 bit your analogue levels can be seemingly very low before sound quality is affected. Its quite safe to record at -20 or even -30dB as shown on logic's meters for eg.
    I hope all this waffle helps LOL!

  • My project title is fuzzy logic controller for rotary crane. need to reduce sway of pendulum

    helo. i want to ask whether my block diagram is correct or not. there is no error occured but no waveform will generate. i give the picture of my block diagram and my front panel. really need help. big thanks!
    Attachments:
    macam jadik je.JPG ‏42 KB
    front panell.JPG ‏28 KB

    Please look at this post for instructions in how to use Fuzzy Logic with RT. However, notice that this only works with RT, not FPGA:
    http://forums.ni.com/t5/LabVIEW/Problem-of-using-fuzzy-in-my-project/m-p/1772362#M615631
    Hope this helps
    Barp - Control and Simulation Group - LabVIEW R&D - National Instruments

  • Multiple Input and Output from a 6534

    Hello
    I am after some advice regarding my PCI 6543 digital I/O card and the best way to achieve my desired results. I am programming in Visual C++ with Ni-DAQ 7.
    I want to generate a pattern output from one of the ports, Port A, following a software command. This pattern consists of a 10uS pulse on DIOA0, that repeats 200 times with a period of 100uS. I want this DIOA0 output line to initiate an input on ports C and D, possibly through the REQ pin. Consequently the input should acquire 200 times for each call to the pattern output.
    I want this to repeat, so the pattern output goes again (as in a FOR loop), and the input occurs again for an as yet undetermined number of times.
    I have managed to get something worki
    ng for 1 iteration, and I can generate multiple pattern outputs, but the inputs only seem to acquire for the 1st iteration. However, if I step through the code in debug mode I can get the input to work correctly.
    Any ideas would be gratefully appreciated.
    I am still trying to get some earlier problems with this application solved.
    Kind Regards
    Jamie

    Hi Jamie,
    There are a couple different ways you can loop from a buffer. You can either use the onboard memory of the 6534 and loop from there or you can specify as a software configuration that the board loop through the PC memory buffer.
    For the onboard looping you need to specify the following:
    iStatus = Set_DAQ_Device_Info (1, ND_PATTERN_GENERATION_LOOP_ENABLE, ND_ON);
    For software, PC memory looping, the following function specifies this:
    iStatus = DIG_DB_Config (iDevice, iGroup, 1, 0, 1);
    I attached a couple programs that might be of use. Check this post:
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=5065000000080000008BA10000&USEARCHCONTEXT_CATEGORY_0=_31_%24_12_&USEARCHCONTEXT_CATEGORY_S=0&UCATEGORY_0=_31_%24_1
    2_&UCATEGORY_S=0
    Hope that helps. Have a good day.
    Ron

  • CFP-DIO-550 open multiple input and output at the same time

    I am trying to read and write at different times with the cFP-DIO-550.  I cant figure out how to read all the inputs at the same time.
    In the Create Tag.vi, I cant figure what to wire to the Item Name input.  I have tried Input 0, and that works, but it is only one input, I need to read all 8.  I have also tried Input All, All, Input 0:8. input 0-8, input 0: Input 8, Input 0 - Input 8, and I always get an error.
    I cant find anything on it in the manual.
    Thanks,
    Kenny

    Normally I would select 'All' using a FP IO point function instead of create tag ( LV 7.0 and up ).   I have noticed that the 'All' is only available if the module is all inputs or all outputs.  It may be that since your module is an IO, 'All' is not available by default. 
    I think you need to create an item in MAX in the Data Neighborhood under the DIO-550 Module and configure it to use all the IO on the module.

  • Planning Folders with multiple input and output layouts

    Hi,
    I have a planning folder with one input layout and 4 output layouts. The input layout has a GPS assigned to it which will be executed before layout change. Will this function get executed when I open any of the output layouts(out of 4) not necessarily the immediate output layout (next to the input layout) and will the calculated data be displayed accordingly. Can some one please confirm me on how that works.
    Scenario2: I have one input layout and 2 output layouts. The input layout has a GPS assigned which will be executed before layout change and the first output layout has another GPS assigned which is basically a push button. Then how does this work.
    Points will be assigned . Help is greatly appreciated.
    Thanks,
    Vamsi

    GPS will not be executed when you open any of the output layouts but will be executed only when you open the input layout. Yes, the calculated data gets stored in planning buffer so it will the displayed in input/output layouts accordingly.
    Scenario2: The GPS assigned to input layout will be executed when you open the input layout. GPS which is assigned to output layout in the form of a button will be only executed when user will click on that button. Calculated results will be available in all the layouts as the result remains in planning buffer until user explicitly click the 'SAVE' icon in applpication toolbar.

  • Multiple input streams

    hey folks newbie here
    i am designing a client server program
    with my client i want to send serialized objects & primitive types across the socket to the server
    is it possible to creat two output streams on the same socket i.e an ObjectOutputStream & a DataOutputStream on the same socket, i have tried this but get some errors so i don't think this is possible
    if not possible how would i be able to send both primitive types & serialized objects across the same socket

    Forget about the first person's post. He his correct, but it is not the solution used by most developers.
    Multiple Input Streams/Output Streams are easy to create. A better "management" deal would be like FTP - FTP uses two port, one for data and one for commands.
    Socket objectSocket = new Socket("www.object-server.com", objectPort);
    Socket dataSocket = new Socket("www.data-server.com", dataPort);
    The server should implement a class which represents the connection of both sockets as a single client. Somethig like this:
    public class Connection {
        Socket dataSocket;
        Socket objectSocket;
        public Connection(Socket s1) {
            dataSocket = s1;
        public void addObjectSocket(Socket s2) {
            objectSocket = s2;
    }You can then use this class (permission given to copy and use without license hereby granted) to manage the task.
    There are also many other ways of doing this. You can also apply multiple i/o streams to the same socket - but your server/client needs to know which data type is being sent or to which stream the data needs to be read from.
    Example: Client sends binary file to server (such as FTP)
    ObjectOutputStream out = new ObjectOutputStream(socket.getOutputStream());
    PrintWriter out2 = new PrintWriter(socket.getOutputStream());
    The code above will work, but data send in one stream will not show up in the other stream. The server does the reverse for the input > adding different InputStreams to the socket, but when data is sent from the client's object stream both of the server's streams (BufferedReader or other text-based input) and the object stream will receieve the file, so you need to communicate between the client and server which stream to read from/write to.
    Client: Send file via socket to server by means of ObjectOutputStream
    Note: You should not need to implement the try-catch logic when passing the argument of the socket - since it would throw that in the class which was calling the constructor, but you CAN implement it here as long as it is not handled in the calling class. If you do, the complier should throw an error saying that the exception would not be thrown at this point.

Maybe you are looking for

  • CoreAudio: Disk is too slow

    Have just switched over to MAC Pro Intel, a few years old. When press play in Garageband 3 get message "CoreAudio: Disk is too slow. (Prepare) (-10001)" This applies all previous Garageband 3 files and any newly created ones. I cannot play any of the

  • I have 2 iphone with separated AppleID , I cannot access the Icloud in both

    Hi, I created 2 Icluod accounts for 2 Iphone 4S I have for my sons. I Tried to backup my contacts but I got all the 1'st contacts list in the 2'nd Iphoe it was download from cluod to both. How I can make sure the icloud backup will be separetly betwe

  • Html link to verify google

    Hi! i cannot figure out why this is so hard.....i am trying to paste an html link to google on my website so i can ratify it google. only google doesn't recognise it or apple won't allow it. Please does anyone have any ideas on what i may be doing wr

  • Third party scenrio

    Hi Guru, I got the two requirements i am not able to fulfill both the requirement. Both the requirements which is related with third party 1. In case of "Third party scenario" Company can only bill to the customer if Invoice verification part is over

  • Trashed my Project in 10.1.1 by mistake

    Hi. I recently updated FCPX to 10.1.1. By mistake, stupidly, I dragged my project into the trash bin. I did not empty the bin. Undo did not work. I have since tried my best, but I cannot seem to find the project or open it. In the trash, the shots (.