FIXED POINT DSP ANALYSIS AND CODE GENERATOR MATLAB FOR MOTOR CONTROL APPLICATIONS

Similar documents
dspace DSP DS-1104 based State Observer Design for Position Control of DC Servo Motor

A Master-Slave DSP Board for Digital Control

SPEED CONTROL OF INDUCTION MACHINE WITH REDUCTION IN TORQUE RIPPLE USING ROBUST SPACE-VECTOR MODULATION DTC SCHEME

INDUCTION MOTOR PERFORMANCE TESTING WITH AN INVERTER POWER SUPPLY, PART 2

DS1104 R&D Controller Board

Simulation of VSI-Fed Variable Speed Drive Using PI-Fuzzy based SVM-DTC Technique

Mathematical Modelling of PMSM Vector Control System Based on SVPWM with PI Controller Using MATLAB

CONVENTIONALLY reduced order models are being

Analysis of Space Vector Pulse Width Modulation VSI Induction Motor on various conditions

REMOTE HOST PROCESS CONTROL AND MONITORING OF INDUSTRY APPLIANCES

EDUMECH Mechatronic Instructional Systems. Ball on Beam System

Mathematical Modeling and Dynamic Simulation of a Class of Drive Systems with Permanent Magnet Synchronous Motors

How to Turn an AC Induction Motor Into a DC Motor (A Matter of Perspective) Steve Bowling Application Segments Engineer Microchip Technology, Inc.

Echtzeittesten mit MathWorks leicht gemacht Simulink Real-Time Tobias Kuschmider Applikationsingenieur

Design of a PM Brushless Motor Drive for Hybrid Electrical Vehicle Application

Real-Time Digital Simulator Enabled Hardware-in-the-Loop Electric Machine Drive Lab

The Design of DSP controller based DC Servo Motor Control System

FUZZY Based PID Controller for Speed Control of D.C. Motor Using LabVIEW

Drivetech, Inc. Innovations in Motor Control, Drives, and Power Electronics

MASTER'S THESIS. Development of a Real Time Test Platform for Motor Drive Algorithms. Viktor Larsson. Luleå University of Technology

STEPPER MOTOR SPEED AND POSITION CONTROL

Modelling, Simulation and Performance Analysis of A Variable Frequency Drive in Speed Control Of Induction Motor

DAQ in MATLAB HANS-PETTER HALVORSEN,

Available online at Available online at

Motor Control Application Tuning (MCAT) Tool for 3-Phase PMSM

New Pulse Width Modulation Technique for Three Phase Induction Motor Drive Umesha K L, Sri Harsha J, Capt. L. Sanjeev Kumar

Dually Fed Permanent Magnet Synchronous Generator Condition Monitoring Using Stator Current

Outline Servo Control

Online Tuning of Artificial Neural Networks for Induction Motor Control

Transient analysis of integrated solar/diesel hybrid power system using MATLAB Simulink

Microcontroller-based experiments for a control systems course in electrical engineering technology

dspic30f4012 Microcontroller

Introduction to Simulink & Stateflow. Coorous Mohtadi

MECE 102 Mechatronics Engineering Orientation

Simulation and Analysis of Parameter Identification Techniques for Induction Motor Drive

DCMS DC MOTOR SYSTEM User Manual

ITEC FlexDMC motion architecture. Thiemo van Engelen 4 June, th Systems/software Architecture Study Group Meeting

Evaluation of Real-time Emulators for Future Development of Fire Control Applications

Design of a Solar Tracker System for PV Power Plants

Setting up a Local Interconnect Network (LIN) using dspace MicroAutoBox 1401/1501 Simulink Blocks

A 5 Degree Feedback Control Robotic Arm (Haptic Arm)

Application Information

Setup for PWM Tests of BLDC Motor

MODELLING AND SIMULATION OF SVPWM INVERTER FED PERMANENT MAGNET BRUSHLESS DC MOTOR DRIVE

Accurate Measurement of the Mains Electricity Frequency

Chapter 6: From Digital-to-Analog and Back Again

Simulation and Animation of Power Electronics and Drives, Requirements for Education

Measuring, Controlling and Regulating with labworldsoft

MATHEMATICAL MODELING OF BLDC MOTOR WITH CLOSED LOOP SPEED CONTROL USING PID CONTROLLER UNDER VARIOUS LOADING CONDITIONS

STATOR FLUX OPTIMIZATION ON DIRECT TORQUE CONTROL WITH FUZZY LOGIC

Digital Signal Processing Solutions for the Switched Reluctance Motor

8051 MICROCONTROLLER COURSE

Software Development with Real- Time Workshop Embedded Coder Nigel Holliday Thales Missile Electronics. Missile Electronics

Motor Fundamentals. DC Motor

Series: IDAM Servo Drive E Digital Motor Drive - DMD

Experiment 2 Introduction to TI C2000 Microcontroller, Code Composer Studio (CCS) and Matlab Graphic User Interface (GUI)

Small Coreless DC Motors

Proceeding of 5th International Mechanical Engineering Forum 2012 June 20th 2012 June 22nd 2012, Prague, Czech Republic

Department of Electrical and Computer Engineering Ben-Gurion University of the Negev. LAB 1 - Introduction to USRP

DRV8312-C2-KIT How to Run Guide

A DESIGN OF DSPIC BASED SIGNAL MONITORING AND PROCESSING SYSTEM

OPC COMMUNICATION IN REAL TIME

Performance Study based on Matlab Modeling for Hybrid Electric Vehicles

ON-LINE REMOTE CONTROL OF MATLAB SIMULATIONS BASED ON ASYNCHRONOUS COMMUNICATION MODEL

Digitale Signalverarbeitung mit FPGA (DSF) Soft Core Prozessor NIOS II Stand Mai Jens Onno Krah

Freescale Semiconductor, I

Performance Enhancement of Wound Rotor Induction Motor by VSI with Dynamic Capacitor Controlled Rotor Circuit

Product Information CANape Option Simulink XCP Server

Mini-Lab Projects in the Undergraduate Classical Controls Course

COMPUTER SIMULATION OF REAL TIME IDENTIFICATION FOR INDUCTION MOTOR DRIVES

Contents. Introduction. Introduction and Motivation Embedded Systems (ES) Content of Lecture Organisational

MICRO HYDRO POWER PLANT WITH INDUCTION GENERATOR SUPPLYING SINGLE PHASE LOADS

Principles of Adjustable Frequency Drives

FRENIC5000MS5 for Machine Tool Spindle Drives

EE 402 RECITATION #13 REPORT

Electronics. Discrete assembly of an operational amplifier as a transistor circuit. LD Physics Leaflets P

EDI Distributor Control Interface Wiring and Setup Instructions

Brush DC Motor Basics. by Simon Pata Business Unit Manager, Brushless DC

An Introduction to MPLAB Integrated Development Environment

Electronic Speed Variator for a Brushless DC Motor

A MULTILEVEL INVERTER FOR SYNCHRONIZING THE GRID WITH RENEWABLE ENERGY SOURCES BY IMPLEMENTING BATTERY CUM DC-DC CONERTER

AN ULTRA-CHEAP GRID CONNECTED INVERTER FOR SMALL SCALE GRID CONNECTION

Programming Logic controllers

Implementation of Fuzzy and PID Controller to Water Level System using LabView

Variable Voltage Variable Frequency Speed Control of Induction Motor Using FPGA-Xilinx

ELECTRICAL ENGINEERING

Force/position control of a robotic system for transcranial magnetic stimulation

LOCAL INTERCONNECT NETWORK (LIN)

Verification of Short Circuit Test Results of Salient Poles Synchronous Generator

A Study of Speed Control of PMDC Motor Using Auto-tuning of PID Controller through LabVIEW

REMOTE MONITORING OF A PERMANENT MAGNET SYNCHRONOUS MOTOR USING ANDROID DEVICES

Parametric variation analysis of CUK converter for constant voltage applications

Micro-Step Driving for Stepper Motors: A Case Study

K.Vijaya Bhaskar,Asst. Professor Dept. of Electrical & Electronics Engineering

Chapter 13. PIC Family Microcontroller

PROGRAM CRITERIA FOR ELECTRICAL ENGINEERING TECHNOLOGY

Hybrid Modeling and Control of a Power Plant using State Flow Technique with Application

TORQUE RIPPLES MINIMIZATION ON DTC CONTROLLED INDUCTION MOTOR WITH ADAPTIVE BANDWIDTH APPROACH

Industrial Process Controllers

Embedded Component Based Programming with DAVE 3

Transcription:

FIXED POINT DSP ANALYSIS AND CODE GENERATOR MATLAB FOR MOTOR CONTROL APPLICATIONS Liviu KREINDLER, Augustin IGNAT, Daniel POPA and Aurelian SARCA Politehnica University of Bucharest, Romania Spl. Independentei 313, Bucharest Tel. +40 1 413 7657, E-mail: l_kreindler@technosoft.ch ABSTRACT: This paper propose a state-of-the-art development approach of digital motor control applications, which implements the developers old dream: start with the complete system model, design the control blocks and analyse its expected behaviour by simulation, then automatically generate executable code for the target control system and perform the tests on the real system. Such an approach not only significantly reduces the development time, but also lets you focus on the application functionality and performance, thus shortening the road from design and laboratory phase up to the industrial application level. I. INTRODUCTION Embedding the Matlab code generator feature in a DSP-based motor control structure offers many significant advantages, as compared with classical approaches: automatic C code generation - eliminates the need to handwrite C and Assembly code; visual modelling and simulation - selection of control structure; optimisation of control parameters for specific application aspects; analysis on the DSP system; validation of the solution on the real control environment; plug-and-play approach (you get a ready-to-run platform). Using a step-by-step approach, you can change components in the system one by one either at H/W level (motor, power converter, sensors), or at S/W level (system model, controllers, etc.). Each change can be individually tested and validated, as soon as it has been made. If any problem occurs, it will be easy to locate the error source, as normally this error will be related to the last performed change in the system structure. This will significantly reduce the time required to migrate from the initial kit to your final application, as well as the volume and level of support you might need for this process. II. MOTOR CONTROL STRATEGY From the general equations of the synchronous drive, we obtain the relations (1) that represent the Matlab/Simulink mathematical model used in this paper: u d u q m = dω J dt = R i d = R i q 3 2 dψ d dθ + ψ q dt dt dθ dψ q + ψ d + dt dt p (ψ d i q ψ q = m mr F Ω i d ) (1) The implementation of a digital motor control scheme requires a microprocessor able to implement all required computations, including coordinates transformations and specific control loops (as current, speed and/or position). Specific I/O interfaces are also needed, as

PWM outputs, analogue inputs for current/voltage measurement and speed/position measurement specific interfaces. As quite significant computational power is needed, the DSP controllers offer a good device covering these features. In this paper, the PMSM digital control scheme is implemented using a DSP controller produced by Texas Instruments. This DSP is a component of the TMS320 family, specifically designed for motion control and having a 150 MIPS computation speed. The PMSM digital motion control scheme has the following components and features: - the motor currents are measured using current transducers placed on inverter legs; If the three measurements and PWM signals are synchronized, then the measured motor phase currents can be used in the fast control loop. - the motor speed is estimated from motor position using an incremental encoder. In order to keep the model simple, the speed information is obtained from the motor position difference at successive time samplings; - the model uses two control loops: o current control fast loop - 100 µ s ; o position/speed control slow loops - 1 ms; - the mathematical computations are performed in IQMATH format; - the fast loop control uses discrete PI controllers, and the slow one uses PID ones The motion control strategy is presented in Fig. 1. and has the following modules: - communication: transmit/receive the motion commands from a computer/industrial application to reference generator; - reference generator: generate the speed/position reference of the motor; - motor control: contains the speed/position controllers; - current control: contains coordinates transformations, and flux/current controllers; - PWM generator: based on voltage reference, issues the correct PWM commands towards the inverter; The software is organized on different priority levels such as: - command interpreter; - reference generator; - I/O Data Exchange - used for debugging; - interrupts: serial communication, A/D conversions, fast/slow loops; - I/O Interface: serial, A/D converter, PWM generator as command for inventor bloc, timers, encoder; Communication module Motion language interpretor Motor control Current reference Motion commands Motor reference Motion parameters Reference generator Current control Current control PWM generator Fig. 1. Motion control program structure

III. MODELLING OF THE POSITION VECTOR CONTROL SCHEME The general diagram of a drive system that controls the position of an electrical motor is presented in Fig. 2. To model an electrical drive system as the one presented in Fig. 2, you need to develop specific components as presented in this chapter, based on the already existing blocks in the Matlab-Simulink simulation environment. Fig. 2. Block diagram of an electrical drive system The equivalent scheme, as implemented in the MATLAB-Simulink environment, is presented in Fig 3. This includes the analogue parts (motor, power converter, sensors), as well as digital ones (digital controllers, A/D, D/A conversions, and digital implementation aspects related to fixed point representation and computations, as used in the DSP controller). Fig. 3. Motion control scheme model in Simulink IV CODE GENERATION Once the system has been simulated, and you are satisfied with its expected behaviour, you can proceed to the next level: generating C/C++ code for the control blocks of the system, in order to implement and test it on the 2812 DSP controller. To do this, you can use the Real

Time Workshop tool of the MATLAB environment. It allows you to generate the complete C/C++ code associated to the blocks of the system s Simulink model. The C code generated from MATLAB is finally included in a basic real-time interrupt application, which can be executed on a TMS320F2812 DSP controller based module. Using the Digital Motor Control Developer Pro (DMCD-Pro) IDE platform, you will be able to download and run the application on the real digital control environment. Code generation is done in four steps if the compile option is selected; otherwise, there are only two steps. 1. The Real-Time Workshop analyses the Simulink model, and then it generates the model.rtw file through a hierarchical representation. 2. The Target Language Compiler analyses the model.rtw file and, depending on the options found in the ti_c28xx.tlc file, generates the corresponding C code. If you choose to uncheck the compile option, the code generation process stops right here; otherwise, the next steps follow. 3. The Target Language Compiler (TLC) compiles and builds the make file, taking into account the model defined in the ti320c28xx.tmf file. 4. The compiling utility reads the make file and compiles the C files, links the object and library files, then creates the.exe file. The Fig. 4 shows how the code is generated by taking into account the user options: Fig. 4. Code generation steps In the second part of the code generation process, the TLC generates the C++ code. The TLC is an interpreter created to convert the model description found in the model.rtw into C++ code. The Target Language Compiler executes a TLC program that contains script files. As the TLC is an interpreter, the scripts specify how the code is generated, having as input the model.rtw file. Due to certain differences between TI s C compiler used by DMCD-Pro, and the MATLAB compiler, the generated C++ code is not compiled at MATLAB level. The C++ code is

embedded in the DMCD-Pro projects, compiled in these projects using TI tools and then downloaded and tested on the real-time environment of the DSP controller. Fig. 5. Code generation model using the Embedded Target for TI320 C28xx DSP library V. EXPERIMENTAL RESULTS AND CONCLUSIONS The results were obtained using a MCK2812 motor control kit and a Pittman 3441 permanent synchronous motor with technical data presented below: - phase resistance 5.25 Ohm - phase inductance 0.46 mh - torque constant 25 mnm/a - rated voltage 19 V - nomimal current 1.16 A - peak torque 94 mnm - rotor inertia 9.9 kgm 2 10-7 - number of pole pairs 2 On the first column are presented the Matlab/Simulink results and on the second column are show the experimental results obtained using DMCD-Pro. Position [bits] time [s]

Iq current [bits] time [s] Motor phases currents [bits] time [s] Fig. 6. Simulated (left column) and experimental results (right column) As we can see from Fig. 6., there is a very good fit between the simulated and experimental results. This validates the proposed approach, and confirms the correctness of the solution. At this point, we can easily change specific control block in the Matlab-Simulik model, in order to eventually test other control strategies and schemes and, once simulation results seem satisfactory, test the new control schemes on the real DSP system. The proposed solution represents an excellent platform for theoretical research and experimental validation of advanced control schemes for digital motor control configurations, and is specifically suitable for laboratory and advanced studies activities in this area. VI. REFERENCES [1] L.Kreindler, A.Sarca, R.Giuclea, L.Antognini, High-level Tools for advanced Digital Motion Control Applications Implementation, SPS/IPC/Drives 2001 Conference, Oct. 2001, Nuremberg, Germany [2] L.Kreindler, R.Giuclea, A.Sarca, V.Burtea, High Level Graphical Tools for Fixed Point DSP Motor Control Implementation, IMCS Conference, San Jose, USA, July 1998 [3] P. Vas: Future Trends and Developments of Electrical Machines and Drives, Power Conversion and Intelligent Motion PCIM 95 Conference, pp. 67-78, Nuremberg, Germany [4] R. Isermann: On the Design and Control of Mechatronic Systems A Survey, Ind. Electronics, Feb. 1996, Vol. 43, No. 1, pp. 4-15 [5] MathWorks: Targeting Real-Time Systems User manual MathWorks 2003 [6] Texas Instruments: TMS320C24x DSP Controllers Peripheral Library and Specific Devices,Texas Instruments 1997 [7] Texas Instruments: TMS320F2810, TMS320F2812 Digital Signal Prossesors Product Overview,Texas Instruments 2000