Sunteți pe pagina 1din 5

MyDCMotorControl

Applying control theory to a real DC motor system in an


open-loop configuration.

This laboratory is designed to give students the opportunity to apply control theory learned during lectures
to a real system, a DC motor system. Through a LabVIEW user interface, they can interact with the system
and observe how specific parameters change the behaviour of the system.

Contents
Introduction ...................................................................................................................................................................... 2
Hardware .......................................................................................................................................................................... 2
NI myDAQ.......................................................................................................................................................................... 2
Building the myDCMotor Circuit ....................................................................................................................................... 3
Basic Control Theory ......................................................................................................................................................... 3
Open-Loop and Closed-Loop Systems .............................................................................................................................. 4
Getting started with the software .................................................................................................................................... 4
PID Control ........................................................................................................................................................................ 5
PI Controller ...................................................................................................................................................................... 5
Introduction
In this laboratory, you will gain an introduction to control theory to learn about how open-loop systems differ from
closed-loop systems and then observe how the behaviour of a system changes by varying parameters in the control
system.

Hardware
For this laboratory, you will need:

 1 x NI myDAQ hardware
 1 x Elenco ProtoBoard with H-bridge circuit
 1 x myDC motor control LabVIEW executable.

NI myDAQ
The myDAQ is a multifunctional data acquisition device which provides analog input and output lines, digital I/O,
audio I/O and DMM functionality. This can be plugged into any computer via USB and used for this laboratory
provided that the DAQmx drivers are installed.

Figure 1.1 myDAQ hardware

For this laboratory, you will need to have the Elenco Protoboard attached to the myDAQ, with the myDC Motor
circuit built onto it.

Figure 1.2 myDAQ with myDCMotor protoboard attached

Page 2 of 5
Building the myDCMotor Circuit
If the myDCMotor circuit has not been prebuilt onto the protoboard for you, you will need:

 2x NPN transistors
 2x PNP transistors
 4x 1kΩ resistors
 1x DC Motor
 Jumper wires

The DC motor runs off a H-bridge circuit.

Figure 2.1 – H-bridge circuit built in the MultiSim modelling environment.

A H-bridge circuit allows a voltage to be applied across a load in either direction and therefore the motor can run
forwards or backwards and comprises of bipolar junction transistors (BJTs), resistors and a motor. The BJTs (NPN and
PNP transistors) are used as amplifiers in the circuit to increase the power through the circuit and in this case the
motor will be powered by the digital output line of the myDAQ hardware to provide enough current output to power
the motor circuit.

Basic Control Theory


Control theory deals with the behaviour of dynamic systems. An external input to the system, the reference, is
passed through a controller and a system to provide an output.

Figure 3.1 Closed-Loop system

Page 3 of 5
In a control system, the inputs and outputs are generally related by differential equations. Transfer functions, which
relate the input and output of the system and act as a mathematical representation of the system, can be acquired
for linear systems by taking the Laplace transform of the system.

Open-Loop and Closed-Loop Systems


There are two main types of control systems, open-loop and closed loop. An open-loop system does not include
feedback in the system and therefore is unable to compensate for any unknown disturbances of uncertainties in the
system. These systems are often implemented in non-critical applications, such as a washing machines, which are
unlikely to experience unexpected disturbances to the system:

Figure 3.2 A open-loop control system

Closed-loop systems on the other hand include a feedback loop. In a closed-loop controller, the feedback is used to
control states or outputs of the dynamic system therefore allowing them to adapt to any unknown disturbances in
the system and stabilising any unstable processes. A common closed-loop controller architecture is a PID controller,
which we will cover later in the tutorial.

Getting started with the software


The tutorial has been designed using National Instruments LabVIEW using the Control Design and Simulation
module; however no LabVIEW knowledge is required. You will be using the myDCMotor executable and can open up
the tutorial by double-clicking on this from your desktop. This will load up the introduction page:

To navigate through the tutorial, use the tabs towards the top of the screen. These will take you through step-by-
step initially detailing some of the basic control theory, then explaining how to set up your hardware before you
start to get practical and see the effect of varying parameters in the system.

When you are ready to end the tutorial, click the “Stop & Exit” button which will stop the motor and close the
window.
Page 4 of 5
PID Control
A proportional-integral-derivative controller (PID) is a typical control loop feedback system, using a closed-loop
system. This is often used in industrial control systems as a feedback controller as it calculates the error value as a
difference between a measured process variable and a desired setpoint.

Figure 4.1 A PID system

The three components that form a PID controller are the proportional (P), the integral (I) and the derivative (D)
values. If we interpret these in terms of time, P depends on the present error, I depends on the past errors and D is a
prediction of any future errors that may occur. By tuning these three parameters, the controller can provide control
action designed for specific process requirements.

On the PID page of the tutorial, we use a simulated PID system to generate a pulse-width modulation (PWM) signal
which is then outputted to the motor. Therefore we can observe when a PWM is generated as the motor will start to
spin.

PI Controller
A proportional-integral controller is a special case of the PID controller, which does not use the derivative of the
error.

Figure 4.2 a PI system

A PI-controller system provides a more accurate model of a real DC motor system. Without the derivative action it
can be more steady in the steady state than PID systems with high frequency inputs. However this also makes it less
responsive to fast alterations in state and therefore can be slower to reach the setpoint. We can see that by varying
the values of the proportional and integral (Kp & Ki) the settling time varies and the desired speed varies from the
simulated motor speed.

Summary
In this laboratory, you have learned some basic motor control theory. You’ve been able to build a DC motor control
circuit on the myDAQ hardware and test it using PID and PI control.

Page 5 of 5

S-ar putea să vă placă și