LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Plant Simulation for PID Control

Hi,

 

This is my first major project with LabVIEW.

 

I am designing a PID controller to control the speed of an electric motor.  It is required to keep the speed at an input value when the mechanical load changes.

 

I would like to simulate the plant (i.e. the motor) with a first or second order transfer function, e.g. H(s)=b0/(s^2+a1*s+a0).  I would like to do this before I try closing the loop with the physical system in the lab (as I haven't applied any control theory before). 

 

I have LabVIEW 2013 here.  In the "Control Design and Simulation" palette, I have "PID" and "Fuzzy Logic" (no others).  The lab has LabVIEW 8.6 with the same "PID" and "Fuzzy Logic" toolkits.  I don't think I need to run the simulation in the lab. 

 

Is it possible for me to simulate a plant with an H(s)? 

 

Thanks in advance!

0 Kudos
Message 1 of 3
(3,274 Views)

Hi ElecEng,

 

It is possible that you can simulate H(s). I would suggest that you should look into the examples found in the NI Example Finder. Open your LabVIEW 2013 >> Help >> Find Examples... >> Go to search tab >> Key in keyword "PID DC motor". You should find some related projects related to the keyword. You can use those programs as reference and perhaps you can play around with it to understand what it does.

 

Since your application seems to be control based. Make sure you do have Control and Simulation Toolkit installed in your computer (if you have purchased it)

 

Hope it helps.

 

Warmest regards,

Lennard.C 

Learning new things everyday...
0 Kudos
Message 2 of 3
(3,243 Views)

First of all, I strongly recommend you to try to see if you can update LabVIEW to the educational version of 2013. This has not only an up to date library, but also have the LabVIEW Control Design and Simulation Module which has several examples on Motor Control. You can find them in here:

 

examples\Control and Simulation\Case Studies\Mechatronics\DC Motor

examples\Control and Simulation\Case Studies\Electrical Machines

 

In general, some universities/schools just need a student request to obtain the latest version of the software. Now, if you don't have access to it and you are stuck using LabVIEW 8.6, you can try to use the following in:

<LabVIEW 8.6>\vi.lib\addons\control\advanced\continuous linear.llb

 

There you will find the Transfer function.vi that allow you to simulate a second order model. Then you can use the PID VI to closed the loop using shift registers. Keep in mind that your model can only have the order of the numenator smaller than denominator, otherwise the simulation won't be correct (that is the reason we have the Control and Simulation Loop).

 

Hopefully this will help you...

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 3 of 3
(3,218 Views)