If we want to control speed of a DC Motor using fuzzy logic then how can we interface the fuzzy logic controller model in MATLAB with real time machine
This should be fairly easy with an acquisition card if it is among those supported by Matlab. You simply put analog inputs and outputs (your DAQ) in the model where they belong.
See pp. 21-26 here: http://home.hit.no/~hansha/documents/matlab/training/Data%20Acquisition%20in%20MATLAB/Data%20Acquisition%20in%20MATLAB.pdf
I don't quite agree with Harun. Of course conneting Matlab simulink to the hardware is very simple by using a DAC/ADC converter and donwloading the generated c code to the hardware if you use a DSP card and vhdl code if you use FPGA. However, if you plan to implement fuzzy control in particular by using Matlab fuzzy toolbox, I should say that it's very hard if not impossible. Because the fuzzy block from fuzzy toolbox contains a lot of unnecessary subsystems which most of DSPs cannot handle to convert the code in real-time, unless you have a very slow system and don't need small sampling time. At least I couldn't manage to do so and I had to write the fuzzy code manually in order to be able to run the fuzzy controller in real-time.
@Amin: We actually had a lab assignment in 2012 (Intelligent Control course) to do fuzzy control on a DC motor via an NI DAQ. It was as simple as it gets, that is why I answered in this manner. It is possible that I'm not aware of all problems that may arise due to complexity, of course.
One possibility, which I myself use, is to use the xPC Target toolbox. The input/output cards can be bought from the the swiss company Speedgoat. With such configuration, I have been able to control quite complex systems in real-time, including fuzzy logic controller.
Actually we use a QuarC software developed by the company Quanser Consulting. It is installed on the top of Matlab and adds additional libraries to Simulink in order to control different DAC/ADC boards, etc. But the most important is that it makes Windows to work in soft real time and in addition it supports the host-target architecture where the target machine is the microprocessor system where the developed program is actually running (it could be an embedded microprocessor system with for example Gumstix processor, or a PC running Windows etc.) and the host is the PC where the program is developed within Simulink and then compiled and transferred to the target. Of course it is possible the host and the target machine to be fisically in one computer. Also communication between host and target could be done in real time.
Farouk Odeim Can you please tell me the price and the version of Speedgoat you have used. It will be really helpful to me proposing the budget for my research lab. Thanks