Guia 08 - LabView PID - Velocidad Motor

Descargar como docx, pdf o txt
Descargar como docx, pdf o txt
Está en la página 1de 10

UNIVERSIDAD CATOLICA DE SANTA MARIA

FACULTAD DE CIENCIAS E INGENIERIAS FÍSICAS Y FORMALES


PROGRAMA PROFESIONAL DE INGENIERIA ELECTRONICA

Practica 08
Control PID de la velocidad de un motor DC con Labview

TAPIA AGUILAR DIEGO ALEXIS COD: 2016247491

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

Ф(s) is the angular velocity (rad/sec)

V(s) is applied voltage (V)

J is the rotor inertia (9.64E-6)

R is the rotor resistance (3.3 Ώ)

K is the torque constant (0.028 N-m\A)

L is the Inductance ( 4.64E-3 H)

B is the Friction Torque Constant (1.8E-6 N-m-s)

Si reemplazamos los valores numéricos, obtendremos la siguiente función de transferencia:


El objetivo es implementar un algoritmo PID que se va a ejecutar en un controlador en tiempo real con una
velocidad de bucle de 1000 Hz (0,001 segundo período).

Comenzamos abriendo el LabVIEW Development Environment

y navigating to the Block Diagram.

On the Functions Palette, select

Control Design & Simulation->Simulation->Control & Simulation Loop

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.

This places a Transfer Function block inside the

Control & Simulation Loop.

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.

Ahora implemente el algoritmo PID.

En la paleta de funciones, seleccione la Control Design & Simulation->PID subpalette

y arrastre y suelte el PID.vi en el bucle Control & Simulation.

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

y seleccione Configuración de nodo SubVI....

para abrir una ventana de diálogo de configuración.

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).

Right-click and select Create->Control.

This creates a control on the Front Panel that you can use to change the PID gains interactively.

Finally, right-click on the dt(s) terminal and create a constant.

This should be the same as the digital period you created previously, 0.001 seconds.

Para crear una señal de entrada, utilice un step signal.

From Control Design & Simulation->Simulation->Signal Generation, select Step Signal and drop it into the
simulation loop.

Deje los parámetros tal como están configurados de forma predeterminada.


Figura 5. Grafica de las señales.

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

Figure 7. Graph properties.

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.

A typical procedure to tune a PID controller would be

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

3.       Modify Ti to remove any steady-state error on the step response

See KnowledgeBase 4AD9N5P9: A Simple Method for Servo Motor Tuning for more information on tuning
a PID controller.
 

[+] Enlarge Image

Figure 8. Simulation results with Kc=0.38, Ti=0.00026, and Td=0.0001.

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:

También podría gustarte