Guia 08 - LabView PID - Velocidad Motor
Guia 08 - LabView PID - Velocidad Motor
Guia 08 - LabView PID - Velocidad Motor
Practica 08
Control PID de la velocidad de un motor DC con Labview
1. DC Motor modelling
En esta practica, diseñaremos el controlador de velocidad para un motor de CC. En aras de la simplicidad
considere una función de transferencia básica para un motor de CC donde se están considerando efectos
como fricción y perturbaciones:
Donde
then click and drag to size and create a Control & Simulation Loop.
Again on the
Simulation subpalette, select Continuous Linear Systems and click once on Transfer Function and once inside the
Control & Simulation Loop you created previously.
Ahora haga doble clic en el bloque Función de transferencia para introducir los parámetros de la función de
transferencia.
Figure 3. Input Transfer Function parameters.
Debido a que el algoritmo PID se va a ejecutar en un sistema operativo basado en tiempo real con una velocidad de
bucle fijo,
haga clic con el botón derecho en el PID.vi
Usted puede utilizar esta ventana para configurar el loop de simulación para manejar la sincronización con este VI
determinado.
Suponga que el controlador se va a ejecutar a una velocidad de bucle de 1000 Hz, así que seleccione discreto con un
valor de período de 0,001 segundos.
Figure 3. PID subVI configuration for timing inside the Control & Simulation Loop.
The “D” that appears on the PID VI indicates that it is being handled as a discrete system.
Run the cursor over the PID VI until you are on top of the PID Gains Terminal (you might type CTRL+H to
Show Context Help if you cannot find it).
This creates a control on the Front Panel that you can use to change the PID gains interactively.
This should be the same as the digital period you created previously, 0.001 seconds.
From Control Design & Simulation->Simulation->Signal Generation, select Step Signal and drop it into the
simulation loop.
Si reorganiza los elementos del Panel frontal y utiliza los valores predeterminados, terminará con un
gráfico similar a la Figura 6:
Figure 6. View the simulation results graphically.
2. Fine-Tune the Simulation
Use LabVIEW native graphical capabilities to improve the simulation and fine-tune the PID gains.
First, change axis properties to have a better view of the simulation results. Right-click on the border of the
XY Graph and uncheck the AutoScale X property under the X Scale option
Before making changes to the PID controller, we will make the simulation more efficient.
As seen on Figure 6 there is no need to simulate the default 10 seconds; the plant is fast enough so that a
final simulation time of 2 seconds is enough.
Now modify the simulation parameters by double-clicking on the Control & Simulation Loop configuration
pane which calls up the Configure Simulation Parameters dialog window. Implement the parameters as
shown in Figure 8.
Figure 8. Change the simulation parameters.
Back to Top
3. PID Tuning
You now can run the VI continuously and change the PID gains until you are satisfied with the results.
1. Kc to 1 and Ti, Td to zero. Keep increasing/decreasing Kc until the response has some overshoot
2. Modify Td to make the system faster and compensate the overshoot
See KnowledgeBase 4AD9N5P9: A Simple Method for Servo Motor Tuning for more information on tuning
a PID controller.
Back to Top
4. Conclusion
You now know how to simulate a discrete-based PID controller with the continuous dynamic system
behavior of a DC motor. You can apply this technique to any kind of hybrid system where continuous and
discrete behavior is mixed. One of the benefits of the procedure shown is that the control algorithm you used
is exactly the same as the one you would use in a Real-Time implementation, and you can take advantage of
many of its features, such as integral anti windup.
Bibliografía:
NI-Tutorial-6931 - Using the LabVIEW PID Control Toolkit with the LabVIEW Control Design and Simulation Module
RESOLUCION: