02-10-2015 08:01 AM
Hi everyone,
I have been trying to implement sliding mode control in LABVIEW , and i think the best option is to use Mtahscript. But i don't have any idea how to do it...
As in MATLAB i had created a model containing two blocks of plant and controller and wrote their equations accordingly, BUT i don't have any idea how to implement it in LABVIEW. Anyone who have used LABVIEW/MAthscript for sliding mode cotroller designing, plz help me finding solution.
Thanks in advance.
Kind regards
02-11-2015 10:48 AM
The preferred way to simulate a system in LabVIEW is to use the Control and Simulation Loop (part of the Control Design and Simulation Module) where the 'solver' integrates the system over time. A good example is the shipping example:
C:\Program Files (x86)\National Instruments\LabVIEW 2014\examples\Control and Simulation\Case Studies\Automotive\ABS Control\Control of Vehicle Motion - ABS.vi
Here is picture of the diagram, so you have an idea.
Now, if you do not have the simulation loop, then you can just use LabVIEW For Loop and try to create the integration funcions that would make this system to work... This is a bit more work but also doable...
02-11-2015 11:57 PM
Thanks Barp for your kind reply,
I do have the control and simulation Loop. But the point that i want to ask is, how to implement Sliding mode control in it, as there are blocks for controller design like PID etc , but i haev to design controller using Sliding mode control technique. I have implemented Sliding mode control in MATLAB/Simulink using S function, but i don't know how to implement it LABVIEW.
02-12-2015 08:29 PM
Well... as you can see in my picture above, you do not necessarily need a S-function. If your S-function is m-based, then you can use the Mathscript node to define the nonlinear equations and, then, use the 'integrator' from Simulation Palette to integrate the signal (if you have derivative).
However, if your S-function is C based, then you can try to use another function in Simulation called External Model Interface. You will need to create a DLL and code your features into it. But probably you have all this code already and I think it can be somewhat easy to do... Here is the documentation:
http://zone.ni.com/reference/en-XX/help/371894D-01/lvsimconcepts/sim_using_emi/
If you still have difficulty to do this after you look into my information, it would help if you could create a simple schematic or some paper that describes what you are trying to do.
Hope this helps,
04-07-2019 04:20 AM
Can you give me file example ABS Brake, please?
@Barp wrote:
The preferred way to simulate a system in LabVIEW is to use the Control and Simulation Loop (part of the Control Design and Simulation Module) where the 'solver' integrates the system over time. A good example is the shipping example:
C:\Program Files (x86)\National Instruments\LabVIEW 2014\examples\Control and Simulation\Case Studies\Automotive\ABS Control\Control of Vehicle Motion - ABS.vi
Here is picture of the diagram, so you have an idea.
Now, if you do not have the simulation loop, then you can just use LabVIEW For Loop and try to create the integration funcions that would make this system to work... This is a bit more work but also doable...
04-07-2019 10:48 PM
This example is shipping with the LabVIEW Control Design and Simulation Module and you can find the example and its subVIs in the folder:
C:\Program Files (x86)\National Instruments\LabVIEW <version>\examples\Control and Simulation\Case Studies\Automotive\ABS Control\
Does that work for you?
04-08-2019 09:27 AM
I can't open this example in my version. Can you give me your example(abs.vi)? Thank you!!!
04-09-2019 09:47 AM - edited 04-09-2019 09:49 AM
If you can't open it, it is because you also need to install the LabVIEW MathScript Module. You can get that in here:
http://www.ni.com/en-us/support/downloads/software-products/download.labview-mathscript-module.html
Also, keep in mind that you have to match the LabVIEW versions of the Modules too. For example, if you have LabVIEW 2018, you have to install LabVIEW Control Design and Simulation Module 2018 and LabVIEW MathScript RT Module 2018 for x86:
http://www.ni.com/download/labview-control-design-and-simulation-module-2018/7367/en/
http://www.ni.com/download/labview-mathscript-rt-module-2018/7408/en/
02-01-2020 01:10 AM
Hi sir..
I AM A NEW WORKER WITH LABVIEW. BUT I WANT TO DESIGN A SLIDING MODE CONTROLER IN LABVIEW. CAN YOU GIVE ME SOME EXAMPLE OF THESE CONTROLLER IN LABVIEW TO HELP ME?
02-01-2020 05:50 PM
@omid73 wrote:I AM A NEW WORKER WITH LABVIEW.
You are asking for a LabVIEW solution, thus you should post in the LabVIEW forum instead. A moderator can move it for you.
(Also please fix your keyboard. It seems your caps-lock is stuck)