Internal Model Control

            for

      DC Motor

Using DSP Platform

 

Functional Requirements

and

                             Performance Specifications 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Advisor: Dr. Dempsey

 

         By: Marcus Fair

 

  November 27, 2007

Problem Description

 

The project involves controlling a Pittman DC motor using a 32-bit TMS320F2812 digital signal processor (DSP) located on the ezdsp F2812 board. This is based on the senior mini-project where an 8051 micro-controller was used to control a Pittman DC motor using assembly language programming. However, the DSP board will play the role of the E-Mac kit. This project will be coded in Matlab and Simulink, which will be automatically converted to an assembly language in order to communicate with the DSP board. Since there will be no assembly language coding in this project more focus and energy can be put into the control theory aspects of the design. The overall block diagram is still based on the senior mini-project so the plant is still the Pittman DC motor. The rotary encoder in the block diagram will still have the same gain value from the mini-project design. The RPM calculations that convert pulses to RPM will also have the same value since this was based off of the same DC motor values such as gear ratio. Even though the board will communicate with both the Matlab and Simulink environment, the code can also be written in C-code. The 32-bit DSP processor will allow many more algorithms such as Internal Model Control and neural network control to be investigated. The final controller will be Internal Model Control (IMC) (an advanced controller that can be used to minimize the effects of external disturbances). First the feed-forward controller will be implemented to test the experimental values of the feed-forward loop. Then the IMC (internal Model control) design will be implemented and the results will be compared to feed-forward controller results.

 

Goals

 

1)   Learn the inputs, outputs and all of the features of the TMS320F2812 DSP and become more familiar with the hardware.

 

2)   Design DSP/motor hardware interface.

 

3)   Design software for PWM generation, velocity calculation from rotary encoder, motor direction sensing, and bi-directional motor control signals.

 

4)   Design closed-loop controllers for velocity control: Single-loop proportional, proportional plus derivative plus integral (PID), and feed-forward control test system with and without external load.

 

5)   Design and implement IMC architecture using neural networks on the physical system.

 

6)   Compare conventional controller results with the IMC method.

 

7)   Design Simulink/MATLAB graphical user interface (GUI) for controller parameter modification.

 

8)      Determine the limitations of the Simulink/TMS320F2812 DSP interface in terms of real-time execution and program memory.

 

Functional Requirements and Performance Specifications

 

·        Motor speed will reach up to 834 RPM

 

·         Motor acceleration will increase by 98 RPM per millisecond

 

·         System will use a 30 VDC power supply

 

·         The PWM timing will be a fixed period 1 khz waveform with variable duty cycle in increments < 0.2%

 

·        Motor velocity display accuracy will be within + or - 10 RPM (battery voltage 0 to 30v)

 

·        Optimum gains for proportional and integral controllers will be determined based on supply variation and external load

 

·         Product temperature will be from 0 to 40 degrees C

 

·        Rise time will be 20 ms or less

 

·         Overshoot will be equal to or less than 5%

 

·         Steady state error will be less than or equal to 5 RPM

 

Subsystem Breakdown

 

eZdsp F2812 Board

Figure 1 shows a high-level diagram of the eZdsp F2812 board. The input will be through a graphical user interface in Simulink that will convert the Matlab/Simulink code using Code Composer Studio 3.0. This software sends the code to the DSP board through the parallel port. Code Composer is necessary to convert the code into a form that can be read by the DSP processor. The DSP chip is then run off of the code to produce a PWM signal that runs the Pittman Motor.

 

 

 

Figure 1 “Block Diagram of eZdsp F2812 connections”

eZdsp F2812 Specs                                        Figure 2

Generation

TMS320F281x Controllers  

CPU

1 C28x  

Peak MMACS

150  

Frequency(MHz)

150  

RAM

36 KB  

OTP ROM

2 KB  

Flash

256 KB  

EMIF

1 16-Bit  

PWM

16-Ch  

CAP/QEP

6/2  

ADC

1 16-Ch 12-Bit  

ADC Conversion Time

80 ns  

McBSP

1  

UART

2 SCI  

SPI

1  

CAN

1  

Timers

3 32-Bit GP,1 WD  

GPIO

56  

Core Supply (Volts)

1.9 V  

IO Supply (Volts)

3.3 V  

Operating Temperature Range (°C)

-40 to 85,-40 to 125  

 

 

 

  

 

H-bridge and External Hardware

Figure 3 shows the single-loop controller diagram that was used for the senior mini-project. The H-bridge will be the amplifier used to step up the voltage of the PWM signal. Other external hardware such as protection circuitry will be included in the system but is yet to be determined yet.

 

Fig. 3 “Single-loop Control of DC motor using DSP board”

 

 

 

 

                                    LMD18200 H-Bridge Specs

 

Delivers up to 3A continuous output  

Operates at supply voltages up to 55V  

Low RDS(ON) typically 0.3W per switch

TTL and CMOS compatible inputs

No “shoot-through” current

Thermal warning flag output at 145°C

Thermal shutdown (outputs off) at 170°C

Internal clamp diodes

Shorted load protection

Internal charge pump with external bootstrap capability

Internal clamp diodes  

Shorter load protection  

Internal charge pump with external bootstrap capability

 

 

                       

                       

 

 

 

 

 

                       

 

 

 

 

Pittman DC motor

The Pittman DC motor block diagram in Figure 4 consists of a transfer function that corresponds to the electrical side and another transfer function that corresponds to the mechanical side. The transfers function for the electrical side and mechanical side were calculated in the Electronic Product Design lab. The incoming signal to the first transfer function represents a difference of the control voltage and the feedback voltage while the output to this transfer function represents the armature current. The current is multiplied by the torque constant gain (kt) whose output is converted to torque. The torque is then multiplied by the transfer function that represents the mechanical side of the motor such as stiffness, friction, and inertia. The final output is rotational velocity. The voltage constant gain (kv) in the feedback loop converts the rotational velocity back into a voltage.   

 

 

Fig. 4 “Block Diagram of Pittman Motor”     

 

                                                             

                       Motor specs   

Part #

GM9236C534-R2  

Gear ratio

5:9:1

No-load at 30V

800 RPM, current 100 ma

 

 

 

 

 

 

                  Encoder Specs

Input Voltage

5V  

Resolution

512 ppr  (before gear reduction  

 

 

 

 

 

 

 

IMC Controller

 

Figure 5 shows the IMC controller used in a single feedback loop configuration. The IMC loop consists of the plant Gp and the transfer function Nc. Nc computes the difference between the outputs of the process and of the IMC. This difference represents the effect of disturbances and of a mismatch of the model. The IMC architectures have been shown to have good robustness properties against disturbances.

 

 

Figure 5 “Block Diagram of IMC for Disturbance Rejection”  

 

 

The first reference is a link to the website that contains the technical reference for the DSP board. It contains the pinout diagram, input and outputs, memory layout, and hardware and software features for the ezdsp board. The 2nd link is a reference to the theory of IMC controllers. The 3rd link is a reference to the datasheets for the Pittman motor and the h-bridge.

 

 

 

 

 

 

 

 

 

 

 

References

 

http://c2000.spectrumdigital.com/ezf2812/

 

 

http://lorien.ncl.ac.uk/ming/robust/imc.pdf

 

http://blackboard.bradley.edu/webapps/portal/frameset.jsp?tab_id=_2_1&url=%2Fwebapps%2Fblackboard%2Fexecute%2Flauncher%3Ftype%3DCourse%26id%3D_41146_1%26url%3D