The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers.    


Datasheet Search Engine   
 
Part # or Description: • 5V RS232 Driver • 2SC5066* • "Real Time Clock" • "USB connector" • "blue led" 5mm • 10 watt zener diode • 2N3055* motorola
 
Search Tip: Try entering the part number only. Include a wildcard (eg. lm317* or 1n4148*)

 

 

3-Phase Synchronous Motor Torque Vector Control Using 56F805 Desi


Datasheet Thumbnail

  

Download PDF



Top Searches for this datasheet




3-Phase Synchronous Motor Torque Vector Control Using 56F805
Designer Reference Manual
56800
Hybrid Controller
DRM018/D Rev. 03/2003
MOTOROLA.COM/SEMICONDUCTORS
More Information This Product, www.freescale.com
More Information This Product, www.freescale.com
3-Phase Synchronous Motor Torque Vector Control Using 56F805
Designer Reference Manual Rev.
Peter Balazovic Motorola Czech System Laboratories Roznov Radhostem, Czech Republic
DRM018 Rev. MOTOROLA
Designer Reference Manual
More Information This Product, www.freescale.com
Revision history
provide most up-to-date information, revision documents World Wide will most current. Your printed copy earlier revision. verify have latest information available, refer following revision history table summarizes changes contained this document. your convenience, page number designators have been linked appropriate location.
Revision history
Date January 2003 Revision Level Initial release Description Page Number(s)
Designer Reference Manual
DRM018 Rev. MOTOROLA
More Information This Product, www.freescale.com
Designer Reference Manual 3-Ph. PMSM Torque Vector Control
List Sections
Section Introduction Section Target Motor Theory
Section System Description. Section Hardware Design. Section Software Design Section System Setup Appendix References. Appendix Glossary.
DRM018 Rev. MOTOROLA
Designer Reference Manual
More Information This Product, www.freescale.com
List Sections
Designer Reference Manual
DRM018 Rev. MOTOROLA
More Information This Product, www.freescale.com
Designer Reference Manual 3-Ph. PMSM Torque Vector Control
Table Contents
Section Introduction
Contents Application Benefit Motorola Advantages Features
Section Target Motor Theory
Contents Permanent Magnet Synchronous Motor Mathematical Description Synchronous Motor. Digital Control Synchronous Motor.
Section System Description
Contents System Specification Vector Control Drive Concept System Blocks Concept
Section Hardware Design
DRM018 Rev. MOTOROLA
Contents Hardware Set-up. DSP56F805EVM Controller Board 3-Ph BLDC Voltage Power Stage Motor-Brake Specifications.
Designer Reference Manual
More Information This Product, www.freescale.com
Table Contents
Hardware Documentation
Section Software Design
Contents Main Software Flow Chart Data Flow State Diagram. Scaling Quantities. Controller Tuning Subprocesses Relation State Transitions
Section System Setup
Contents Application Description Application Set-Up Projects Files Application Build Execute Warning
Appendix References Appendix Glossary
Designer Reference Manual
DRM018 Rev. MOTOROLA
More Information This Product, www.freescale.com
Designer Reference Manual 3-Ph. PMSM Torque Vector Control
List Figures
Figure Title Page
Synchronous Motor Cross Section. Stator Current Space Vector Projection Application General Reference Frame Phase Inverter Pulse Width Modulation Block Diagram Synchronous Motor Vector Control Clarke Transformation Establishing Coordinate System (Park Transformation). Normal Operation Field-Weakening Drive Concept Quadrature Encoder Signals Quad Timer Module Configuration Speed Processing. Rotor Alignment Rotor Alignment Flow Chart Current Shunt Resistors Current Amplifier. Time Diagram Synchronization 3-10 Voltage Shapes Different Periods 3-11 3-phase Sinewave Voltages Corresponding Sector Value 3-12 Temperature Sensing High-Voltage Hardware System Configuration Block Diagram DSP56F805EVM Block Diagram Software Flow Chart General Overview Software Flow Chart interrupt Software Flow Chart Fault interrupt.
DRM018 Rev. MOTOROLA
Designer Reference Manual
More Information This Product, www.freescale.com
List Figures
5-10 5-11 Flow Chart General Overview. Data Flow Part Data Flow Part Data Flow PMSM Control Current Control State Diagram Application Control State Diagram PMSM Control State Diagram Fault Control State Diagram Analog Sensing RUN/STOP Switch UP/DOWN Buttons DSP56F805EVM USER LEDs DSP56F805EVM. Master Software Control Window Set-up 3-phase Synchronous Motor Control Application using DSP56F805EVM. DSP56F805EVM Jumper Reference Target Build Selection. Execute Make Command
Designer Reference Manual
DRM018 Rev. MOTOROLA
More Information This Product, www.freescale.com
Designer Reference Manual 3-Ph. PMSM Torque Vector Control
List Tables
Table Title Page
Memory Configuration High Voltage Hardware Specifications Electrical Chatacteristics 3-Ph BLDC Voltage Power Stage Motor Brake Specifications. Motor-Brake Specifications Motor Application States. DSP56F805EVM Jumper Settings
DRM018 Rev. MOTOROLA
Designer Reference Manual
More Information This Product, www.freescale.com
List Tables
Designer Reference Manual
DRM018 Rev. MOTOROLA
More Information This Product, www.freescale.com
Designer Reference Manual 3-Ph. PMSM Torque Vector Control
Section Introduction
Contents
Application Benefit Motorola Advantages Features
Application Benefit
This Reference Design Manual describes design 3-phase Permanent Magnet (PM) synchronous motor torque vector control based Motorola's DSP56F805 dedicated motor control device. synchronous motors very popular wide application area. synchronous motor lacks commutator therefore more reliable than motor. synchronous motor also advantages when compared induction motor. Because synchronous motor achieves higher efficiency generating rotor magnetic flux with rotor magnets, synchronous motors used high-end white goods (such refrigerators, washing machines, dishwashers); high-end pumps; fans; other appliances which require high reliability efficiency. concept application close-loop synchronous drive using Vector Control technique. This Reference Design includes basic motor theory, system design concept, hardware implementation software design, including master software visualization tool.
DRM018 Rev. MOTOROLA Introduction More Information This Product, www.freescale.com
Designer Reference Manual
Introduction Motorola Advantages Features
Motorola DSP56F80x family well suited digital motor control, combining DSP's computational ability with MCU's controller features single chip. These DSPs offer many dedicated peripherals like Pulse Width Modulation (PWM) unit, Analog-to-Digital Converter (ADC), timers, communications peripherals (SCI, SPI, CAN), on-board Flash RAM. Generally, family members well-suited synchornous motor control.
typical member family, DSP56F805, provides following peripheral blocks: Pulse Width Modulator modules (PWMA PWMB), each with outputs, three Current Sense inputs, four Fault inputs; fault tolerant design with deadtime insertion; supports both Center- Edge- aligned modes Twelve bit, Analog Digital Converters (ADCs), supporting simultaneous conversions with dual 4-pin multiplexed inputs; synchronized Quadrature Decoders (Quad Dec0 Quad Dec1), each with four inputs, additional Quad Timers dedicated General Purpose Quad Timers totaling pins: Timer with pins Timer with pins Module with 2-pin ports used transmit receive Serial Communication Interfaces (SCI0 SCI1), each with pins, four additional GPIO lines Serial Peripheral Interface (SPI), with configurable 4-pin port, four additional GPIO lines Computer Operating Properly (COP) Watchdog Timer dedicated external interrupt pins Fourteen dedicated General Purpose (GPIO) pins, multiplexed GPIO pins External reset hardware reset JTAG/On-Chip Emulation (OnCE)
DRM018 Rev. Introduction More Information This Product, www.freescale.com MOTOROLA
Designer Reference Manual
Introduction Motorola Advantages Features
Software-programmable, Phase Lock Loop-based frequency synthesizer core clock Table 1-1. Memory Configuration
DSP56F801 DSP56F803 DSP56F805 DSP56F807
Program Flash Data Flash Program
8188 16-bit 16-bit 16-bit 16-bit 16-bit
32252 16-bit 16-bit 16-bit 16-bit 16-bit
32252 16-bit 16-bit 16-bit 16-bit 16-bit
61436 16-bit 16-bit 16-bit 16-bit 16-bit
Data Boot Flash
most interesting peripherals, from synchronous motor control point view, fast Analog-to-Digital Converter (ADC) Pulse-Width-Modulation (PWM) on-chip modules. They offer extensive freedom configuration, enabling efficient control motors. module incorporates generator, enabling generation control signals motor power stage. module following features: Three complementary signal pairs, independent signals Complementary channel operation Deadtime insertion Separate bottom pulse width correction current status inputs software Separate bottom polarity control Edge-aligned center-aligned signals bits resolution Half-cycle reload capability Integral reload rates from Individual software-controlled output
DRM018 Rev. MOTOROLA Introduction More Information This Product, www.freescale.com
Designer Reference Manual
Introduction
Programmable fault protection Polarity control 20mA current sink capability pins Write-protectable registers
synchronous motor control utilizes block complementary mode, permitting generation control signals switches power stage with inserted deadtime. block generates three sinewave outputs mutually shifted degrees.
Analog-to-Digital Converter (ADC) consists digital control module analog sample hold (S/H) circuits. following features:
Designer Reference Manual Introduction More Information This Product, www.freescale.com
12-bit resolution Maximum clock frequency 5MHz with 200ns period Single conversion time clock cycles (8.5 1.7µs) Additional conversion time clock cycles 1.2µs) Eight conversions 26.5 clock cycles (26.5 5.3µs) using simultaneous mode synchronized sync signal Simultaneous sequential sampling Internal multiplexer select eight inputs Ability sequentially scan store eight measurements Ability simultaneously sample hold inputs Optional interrupts scan zero crossing out-of-range limit exceeded Optional sample correction subtracting pre-programmed offset value Signed unsigned result Single ended differential inputs
DRM018 Rev. MOTOROLA
Introduction Motorola Advantages Features
application utilizes on-chip module simultaneous mode sequential scan. sampling synchronized with pulses precise sampling reconstruction phase currents. Such configuration allows instant conversion desired analog values phase currents, voltages temperatures.
DRM018 Rev. MOTOROLA Introduction More Information This Product, www.freescale.com
Designer Reference Manual
Introduction
Designer Reference Manual Introduction More Information This Product, www.freescale.com
DRM018 Rev. MOTOROLA
Designer Reference Manual 3-Ph. PMSM Torque Vector Control
Section Target Motor Theory
Contents
Permanent Magnet Synchronous Motor Mathematical Description Synchronous Motor. Digital Control Synchronous Motor.
Permanent Magnet Synchronous Motor
synchronous motor rotating electric machine with classic 3-phase stator like that induction motor; rotor surface-mounted permanent magnets (see Figure 2-1).
Stator Stator winding slots) Shaft Rotor Permanent magnets
Figure 2-1. Synchronous Motor Cross Section
DRM018 Rev. MOTOROLA Target Motor Theory More Information This Product, www.freescale.com Designer Reference Manual
Target Motor Theory
this respect, synchronous motor equivalent induction motor, where magnetic field produced permanent magnet, rotor magnetic field constant. synchronous motors offer number advantages designing modern motion control systems. permanent magnet generate substantial magnetic flux makes possible design highly efficient motors.
Mathematical Description Synchronous Motor
model used vector control design understood using space vector theory. three-phase motor quantities (such voltages, currents, magnetic flux, etc.) expressed terms complex space vectors. Such model valid instantaneous variation voltage current adequately describes performance machine under both steady-state transient operation. complex space vectors described using only orthogonal axes. look motor two-phase machine. Using two-phase motor model reduces number equations simplifies control design.
2.3.1 Space Vector Definition Assume isa, isb, instantaneous balanced three-phase stator currents:
2-1.)
Then define stator current space vector follows:
2-2.)
where spatial operators, ej2/3, ej4/3 transformation constant, chosen k=2/3. Figure shows stator current space vector projection:
Designer Reference Manual Target Motor Theory More Information This Product, www.freescale.com
DRM018 Rev. MOTOROLA
Target Motor Theory Mathematical Description Synchronous Motor
phase-
Figure 2-2. Stator Current Space Vector Projection space vector defined 2-2.) expressed utilizing two-axis theory. real part space vector equal instantaneous value direct-axis stator current component, whose imaginary part equal quadrature-axis stator current component, Thus, stator current space vector, stationary reference frame attached stator expressed
2-3.)
symmetrical three-phase machines, direct quadrature axis stator currents fictitious quadrature-phase (two-phase)
DRM018 Rev. MOTOROLA Target Motor Theory More Information This Product, www.freescale.com
Designer Reference Manual
Target Motor Theory
current components, which related actual three-phase stator currents follows:
2-4.)
2-5.)
where k=2/3 transformation constant.
space vectors other motor quantities (voltages, currents, magnetic fluxes etc.) defined same stator current space vector. description synchronous motor, symmetrical three-phase smooth-air-gap machine with sinusoidally-distributed windings considered. voltage equations stator instantaneous form then expressed
2-6.) 2-7.) 2-8.)
where uSA, instantaneous values stator voltages, iSA, instantaneous values stator currents, instantaneous values stator flux linkages, phase large number equations instantaneous form, equations 2-6.), 2-7.) 2-8.), more practical
Designer Reference Manual Target Motor Theory More Information This Product, www.freescale.com
DRM018 Rev. MOTOROLA
Target Motor Theory Mathematical Description Synchronous Motor
rewrite instantaneous equations using axis theory (Clarke transformation). synchronous motor expressed
2-9.) 2-10.) 2-11.) 2-12.) 2-13.)
where:
stator orthogonal coordinate system
stator voltage stator current stator magnetic flux rotor magnetic flux stator phase resistance stator phase inductance electrical rotor speed fields speed number poles phase inertia load torque
rotor position coordinate system
equations 2-9.) through 2-13.) represent model synchronous motor stationary frame fixed stator. Besides stationary reference frame attached stator, motor model voltage space vector equations formulated general reference frame, which rotates general speed general reference frame used, with direct quadrature axes rotating general instantaneous speed g=dg/dt, shown Figure 2-3, where angle between direct axis stationary reference
DRM018 Rev. MOTOROLA Target Motor Theory More Information This Product, www.freescale.com Designer Reference Manual
Target Motor Theory
frame attached stator real axis general reference frame, then 2-14.) defines stator current space vector general reference frame:
2-14.)
Figure 2-3. Application General Reference Frame
stator voltage flux-linkage space vectors similarly obtained general reference frame. Similar considerations hold space vectors rotor voltages, currents flux linkages. real axis reference frame attached rotor displaced from direct axis stator reference frame rotor angle Since seen that angle between real axis general reference frame real axis reference frame rotating with rotor g-r, general reference frame, space vector rotor currents expressed
jiry
2-15.)
DRM018 Rev.
Designer Reference Manual Target Motor Theory More Information This Product, www.freescale.com
MOTOROLA
Target Motor Theory Mathematical Description Synchronous Motor
where space vector rotor current rotor reference frame. space vectors rotor voltages rotor flux linkages general reference frame similarly expressed. motor model voltage equations general reference frame expressed utilizing introduced transformations motor quantities from reference frame general reference frame. synchronous motor model often used vector control algorithms. vector control implement control schemes which produce high dynamic performance similar those used control machines. achieve this, reference frames aligned with stator flux-linkage space vector, rotor flux-linkage space vector magnetizing space vector. most popular reference frame reference frame attached rotor flux linkage space vector, with direct axis quadrature axis (q). After transformation into coordinates, motor model follows:
2-16.) 2-17.) 2-18.) 2-19.) 2-20.)
considering that below base speed isd=0, equation 2-20.) reduced following form:
2-21.)
DRM018 Rev. MOTOROLA Target Motor Theory More Information This Product, www.freescale.com
Designer Reference Manual
Target Motor Theory
From equation 2-21.), seen that torque dependent directly controlled current only. obvious obtain synchornous motor torque eqaution follwos:
2-22.)
Digital Control Synchronous Motor
Usually applications synchronous motors powered inverters. inverter converts power power required frequency amplitude. typical 3-phase inverter illustrated Figure 2-4.
PWM_Q1
PWM_Q3
PWM_Q5
PWM_Q2
PWM_Q4
PWM_Q6
Phase_A
Phase_B
Phase_C
Figure 2-4. Phase Inverter inverter consists three half-bridge units where upper lower switches controlled complementarily, meaning when upper turned lower must turned off, vice versa. Because power device's turn time longer than turn time, some deadtime must inserted between turn transistor half-bridge, turn complementary device.
Designer Reference Manual Target Motor Theory More Information This Product, www.freescale.com
DRM018 Rev. MOTOROLA
Target Motor Theory Digital Control Synchronous Motor
output voltage mostly created pulse width modulation (PWM) technique, where isosceles triangle carrier wave compared with fundamental-frequency sine modulating wave, natural points intersection determine switching points power devices half bridge inverter. This technique shown Figure 2-5. 3-phase voltage waves shifted 120o each other and, thus, 3-phase motor supplied.
Generated Sine Wave
Carrier Wave
Output (Upper Switch) Output (Lower Switch)
Figure 2-5. Pulse Width Modulation most popular power devices motor control applications Power MOSFETs IGBTs. Power MOSFET voltage-controlled transistor. designed high-frequency operation voltage drop; thus, power losses. However, saturation temperature sensitivity limits MOSFET application high-power applications. insulated-gate bipolar transistor (IGBT) bipolar transistor controlled MOSFET base. IGBT requires drive current, fast switching time, suitable high switching
DRM018 Rev. MOTOROLA Target Motor Theory More Information This Product, www.freescale.com Designer Reference Manual
Target Motor Theory
frequencies. disadvantage higher voltage drop bipolar transistor, causing higher conduction losses.
2.4.1 Vector Control Synchronous Motor Vector Control elegant control method synchronous motor, where field-oriented theory used control space vectors magnetic flux, current, voltage. possible coordinate system decompose vectors into magnetic field-generating part torque-generating part. structure motor controller (Vector Control controller) then almost same separately-excited motor, which simplifies control synchronous motor. This Vector Control technique developed specifically achieve similarly dynamic performance synchronous motors. explained Vector Control Drive Concept, there chosen torque control with inner current closed-loop, where rotor flux considered zero input. This method broken down onto field-generating torque-generating parts stator current able separately control magnetic flux torque. order need rotary coordinate system connected rotor magnetic field; this system generally called "d-q coordinate system". Very high performance needed perform transformation from rotary stationary coordinate systems. Therefore, Motorola DSP56F80x very well suited Vector Control algorithm. transformations which needed Vector Control will described next section.
2.4.2 Block Diagram Vector Control Figure shows basic structure Vector Control synchronous motor. perform Vector Control, follow these steps:
Designer Reference Manual Target Motor Theory More Information This Product, www.freescale.com
Measure motor quantities (phase voltages currents) Transform them into two-phase system using Clarke transformation Calculate rotor flux space vector magnitude position angle
DRM018 Rev. MOTOROLA
Target Motor Theory Digital Control Synchronous Motor
Transform stator currents into coordinate system using Park transformation stator current torque- (isq) flux- (isd) producing components controlled separately controllers output stator voltage space vector calculated using decoupling block stator voltage space vector transformed back from coordinate system into two-phase system fixed with stator inverse Park transformation Using sinewave modulation, output 3-phase voltage generated
Torque Command
Sq_lin
Line Input
Decoupling
Sinewave Generation
Flux Command
Sd_lin
3-phase Power Stage
Forward Park Transformation
Forward Clarke Transformation
PMSM motor
Position
Position/Speed sensor
Figure 2-6. Block Diagram Synchronous Motor Vector Control
2.4.3 Vector Control Transformations Transforming synchronous motor into motor based points view. shown 2.4.2 Block Diagram Vector Control, coordinate transformation required.
DRM018 Rev. MOTOROLA Target Motor Theory More Information This Product, www.freescale.com
Designer Reference Manual
Target Motor Theory
following transformations involved Vector Control: Transformations from 3-phase 2-phase system (Clarke transformation) Rotation orthogonal system (Park transformation) (Inverse Park transformation) 2.4.3.1 Clarke Transformation Figure shows three-phase system transformed into two-phase system.
phase-
measured
measured
phase-a
calculated
phase-
Figure 2-7. Clarke Transformation
Designer Reference Manual Target Motor Theory More Information This Product, www.freescale.com
DRM018 Rev. MOTOROLA
Target Motor Theory Digital Control Synchronous Motor
transfer graphical representation into mathematical language:
2-23.)
most cases, 3-phase system symmetrical, which means that phase quantities always zero.
a+b+c
2-24.)
constant freely chosen equalizing -quantity a-phase quantity recommended. Then:
2-25.)
fully define Park-Clarke transformation:
a+b+c
2-26.)
2.4.3.2 Transformation from Coordinates Backwards Vector Control performed entirely coordinate system make control synchronous motors elegant easy; 2.4.2 Block Diagram Vector Control. course, this requires transformation both directions control action must transformed back motor side.
DRM018 Rev. MOTOROLA Target Motor Theory More Information This Product, www.freescale.com
Designer Reference Manual
Target Motor Theory
First, establish coordinate system:
2-27.)
Field Field
2-28.)
Then transform from coordinates:
Field Field Field Field
2-29.)
Figure illustrates this transformation.
Field
Figure 2-8. Establishing Coordinate System (Park Transformation)
Designer Reference Manual Target Motor Theory More Information This Product, www.freescale.com
DRM018 Rev. MOTOROLA
Target Motor Theory Digital Control Synchronous Motor
backward (Inverse Park) transformation (from
Field Field Field Field
2-30.)
2.4.4 PMSM Vector Control This section describes control regarding required stator current vectors isd, isq. There speed ranges (shown Figure 2-9), which differ controlled current vector: Control Normal Operating Range control mode speed required below nominal motor speed Control Field-Weakening Range control mode speed required above nominal motor speed. This application does utilize control field-weakening range.
2.4.4.1 Control Normal Operating Range Assume ideal synchronous motor with constant stator reluctance, const. equations 2-17.), 2-18.) 2-19.) then written
2-31.)
demonstrated from synchronous motor equations, maximum efficiency ideal synchronous motor obtained when maintaining current flux-producing component zero. Therefore, drive from Figure 2-6, Field-Weakening Controller sets normal operating range. torque regulator controls current torque-producing component isq. real 3-phase power inverter voltage current rating limitations: absolute value stator voltage physically limited according DCBus voltage u_sdq_max limit
DRM018 Rev. MOTOROLA Target Motor Theory More Information This Product, www.freescale.com Designer Reference Manual
Target Motor Theory
absolute value stator current should maintained below limit I_SDQ_MAX given maximum current rating normal operating range, current torque-producing component I_SDQ_MAX, since voltage limitation, maximum speed normal motor operating range limited nominal motor speed shown Figure 2-31.).
nominal speed stator voltage u_sdq_max
normal operating range
field weakenning range
speed
stator current
Figure 2-9. Normal Operation Field-Weakening
Designer Reference Manual Target Motor Theory More Information This Product, www.freescale.com
DRM018 Rev. MOTOROLA
Designer Reference Manual 3-Ph. PMSM Torque Vector Control
Section System Description
Contents
System Specification Vector Control Drive Concept System Blocks Concept
System Specification
motor control system designed drive 3-phase synchronous motor closed-loop torque-generating part current isq. application meets following performance specifications: Torque vector control motor using quadrature encoder position sensor Targeted DSP56F805EVM Running 3-phase Low-volatge synchronous motor control development platform Control technique incorporates: Vector Control with torque-generating part current Rotation both directions Motoring generator mode with brake Start from motor position with rotor alignment Manual interface (Start/Stop switch, Up/Down push button control, indicator) master software control interface (motor start/stop, speed set-up)
DRM018 Rev. MOTOROLA System Description More Information This Product, www.freescale.com
Designer Reference Manual
System Description
master software remote monitor Power stage board identification Overvoltage, undervoltage, overcurrent overheating fault protection
synchronous drive introduced here designed power high-voltage synchronous motor with quadrature encoder. following specifications:
Table 3-1. High Voltage Hardware Specifications
Motor Type Speed Range Motor Characteristics: Maximum Electrical Power: Phase Voltage Phase Current Speed Range Input Voltage Drive Characteristics: Maximum DCBus Voltage Control Algorithm Optoisolation poles, 3-phase, star connected, BLDC motor 3000 12V) 3*6.5 3000 15.8 Torque Closed-Loop Control Required
Vector Control Drive Concept
standard system concept used with this drive; Figure 3-1. system incorporates following hardware parts: Three-phase synchronous motor high-voltage development platform Feedback sensors for: Position (quadrature encoder) DCBus voltage
Designer Reference Manual System Description More Information This Product, www.freescale.com DRM018 Rev. MOTOROLA
System Description Vector Control Drive Concept
Phase currents DCBus overcurrent detection Temperature DSP56F805 evaluation module
drive controlled different operational modes: Manual operational mode, required speed Start/Stop switch Up/Down push buttons.
master software operational mode, required speed Start/Stop switch
Figure 3-1. Drive Concept
DRM018 Rev. MOTOROLA System Description More Information This Product, www.freescale.com Designer Reference Manual
System Description
control process follows: When Start command accepted (using Start/Stop Switch master software command), required torque generating part current calculated according Up/Down push buttons master software commands. required torque generating part current reference command current controller. comparison between required torque generating part current command actual measured current generates current error. Based error, current controller generates volatge, Us_qReq. second part stator current Is_dReq, which corresponds flux might given Field-Weakening Controller this application considered zero current. Simultaneously, stator currents Is_a, Is_b, Is_c measured transformed from instantaneous values into stationary reference frame consecutively into rotary reference frame (Park Clarke transformation). Based errors between required actual currents rotary reference frame, current controllers generate output voltages Us_q Us_d rotary reference frame d-q). voltages Us_q Us_d transformed back into stationary reference frame and, after DCBus ripple elimination, recalculated 3-phase voltage system, which applied motor. actual speed calculated from pulses quadrature encoder. Beside main control loop, DCBus voltage, DCBus current power stage temperature measured during control process. They used overvoltage, undervoltage, overcurrent overheating protection drive. undervoltage overheating protection performed software, while overcurrent overvoltage fault signal utilizes fault input DSP. previously-mentioned faults occur, motor control outputs disabled order protect drive, fault state system displayed on-board LED. hardware error also detected wrong power stage used. Each power stage contains simple module generating logic sequence unique that type power stage. During chip initialization, this sequence read evaluated according decoding table. correct power stage identified, program continue. case
Designer Reference Manual System Description More Information This Product, www.freescale.com DRM018 Rev. MOTOROLA
System Description System Blocks Concept
wrong hardware, program stays infinite loop, displaying fault condition.
System Blocks Concept
3.4.1 Position Speed Sensing members Motorola's DSP56F80x family, except DSP56F801 device have quadrature decoder. This peripheral commonly used position speed sensing. quadrature decoder position counter counts up/down each edge Phase Phase signals according their order. each revolution, position counter cleared index pulse; Figure 3-2.
Figure 3-2. Quadrature Encoder Signals This means that zero position linked with index pulse, Vector Control requires zero position, where rotor aligned axis; 3.4.1.4 Position Reset with Rotor Alignment. Therefore, using quadrature decoder decode encoder's signal requires either calculation offset which aligns quadrature decoder position counter with aligned rotor position (zero position), coupling zero rotor position with index pulse quadrature encoder. avoid calculation rotor position offset, quadrature decoder used this application. decoder's digital processing capabilities then free used another application application presented then DSP56F801, which lacks quadrature decoder.
DRM018 Rev. MOTOROLA System Description More Information This Product, www.freescale.com
Designer Reference Manual
System Description
addition quadrature decoder, input signals (Phase Phase Index) connected quad timer module quad timer module consists four quadrature timers. wide variability quad timer modules, possible this module decode quadrature encoder signals, sense position, speed. configuration quad timer module shown Figure 3-3.
Figure 3-3. Quad Timer Module Configuration 3.4.1.1 Position Sensing position speed sensing algorithm uses timers module additional timer time base. Timers used position sensing. Timer permits connection three input signals quadrature timer even timer only inputs (primary secondary), accomplished using timer quadrature decoder only. count quadrature mode, count zero, then reinitialize. This timer setting used decode
Designer Reference Manual System Description More Information This Product, www.freescale.com DRM018 Rev. MOTOROLA
System Description System Blocks Concept
quadrature signals only. Timer connected timer cascade mode. this mode, information about counting up/down connected internally timer thus, secondary input timer free used index pulse. counter count +/((4*number pulses revolution) reinitialize after compare. value timer corresponds rotor position. position index pulse sensed avoid loss some pulses under influence noise during extended motor operation, which result incorrect rotor position sensing. some pulses lost, different position index pulse detected, position sensing error signaled. check index pulse required, timer removed timer position counter resulting value timer scaled range <-1; which corresponds 3.4.1.2 Speed Sensing There common ways measure speed. first method measures time between following edges quadrature encoder, second method measures position difference number pulses) constant period. first method used speed. moment when measured period very short, speed calculation algorithm switches second method. proposed algorithm combines both methods. algorithm simultaneously measures number quadrature encoder pulses constant period, accurate time interval between first last pulse counted during that constant period. speed then expressed
speed
3-1.)
where:
speed alculated speed scaling constant number pulses constant period
DRM018 Rev. MOTOROLA System Description More Information This Product, www.freescale.com
Designer Reference Manual
System Description
accurate period pulses
algorithm requires timers counting pulses measuring their period, third timer time base; Figure 3-3. Timer counts pulses quadrature encoder, timer counts system clock divided values both timers captured each edge Phase signal. time base provided timer which call speed processing algorithm every 900µs. explanation speed processing algorithm works follows.
First, captured values both timers read. difference number pulses their accurate time interval calculated from actual previous values. values then saved next period, capture register enabled. From that moment, first edge Phase signal captures values both timers (A2, capture register disabled. This process repeated each call speed processing algorithm; Figure 3-4.
Figure 3-4. Speed Processing
Designer Reference Manual System Description More Information This Product, www.freescale.com
DRM018 Rev. MOTOROLA
System Description System Blocks Concept
3.4.1.3 Minimum Maximum Speed Calculation minimum speed calculated with following equation:
-4NT calc
3-2.)
where:
Minimum obtainable speed [rpm] Number pulses revolution [1/rev] Period speed measurement (calculation period)
Tcalc
application, quadrature encoder 1024 pulses revolution calculation period 900µs chosen basis motor mechanical constant. Thus, 3-2.) calculates minimum speed 16.3 rpm. maximum speed expressed
-4NT clkT2
3-3.)
where:
Maximum obtainable speed [rpm] Number pulses revolution [1/rev]
TclkT2 Period input clock timer
Substitution 3-3.) TclkT2 (timer input clock system clock MHz/2) yields maximum speed 263672rpm. demonstrated, algorithm measure speed across wide range. Because such high speed practical, maximum speed reduced required range constant 3-1.). constant calculated
-4NT clkT2
3-4.)
where:
DRM018 Rev. MOTOROLA System Description More Information This Product, www.freescale.com Designer Reference Manual
System Description
Scaling constant 3-1.) Maximum speed range [rpm] Number pulses revolution [1/rev]
TclkT2 Period input clock timer
this application, maximum measurable speed limited 6000rpm.
NOTE:
ensure accurate speed calculation, must choose input clock timer that calculation period speed processing this case, 900µs) represented timer value lower than 0x7FFFH (900.10-6/TclkT2<=0x7FFFH).
3.4.1.4 Position Reset with Rotor Alignment After reset, rotor position unknown, because quadrature encoder does give absolute position until index pulse arrives. shown Figure 3-5, rotor position must aligned with axis coordinate system before motor begins running. alignment algorithm shown Figure 3-6. First, position zero, independent actual rotor position. (The value quadrature encoder does affect this setting). Then current alignment current. rotor aligned required position. After rotor stabilization, encoder reset zero position, then current back zero, alignment finished. alignment executed only once during first transition from Stop state Run/Stop switch.
Designer Reference Manual System Description More Information This Product, www.freescale.com
DRM018 Rev. MOTOROLA
System Description System Blocks Concept
unknown rotor position (not aligned)
zero rotor position (aligned)
Field
Figure 3-5. Rotor Alignment
Alignment
fixed position (0°)
Reset encoder position
Iq=0 Id=IAlignment
Iq=0 Id=0
Wait rotor stabilization
position from encoder
Figure 3-6. Rotor Alignment Flow Chart
DRM018 Rev. MOTOROLA System Description More Information This Product, www.freescale.com
Designer Reference Manual
System Description
3.4.2 Current Sensing Phase currents measured shunt resistor each phase. voltage drop shunt resistor amplified operational amplifier, shifted 1.65V. resultant voltage converted converter (see Figure Figure 3-8).
SKB04N60
Gate_AT
Gate_BT
SKB04N60
Gate_CT
SKB04N60
Phase_A
Phase_B
SKB04N60
Phase_C
SKB04N60
SKB04N60
Gate_AB
Gate_BB
Source_BB
Gate_CB
Source_CB
Source_AB
I_sense_A1
sense
I_sense_B1
sense
I_sense_C1
sense
I_sense_A2
sense
I_sense_B2
sense
I_sense_C2
sense
Figure 3-7. Current Shunt Resistors
R318 75k-1%
R320 10k-1%
R321 10k-1%
R323
R322 75k-1%
+3.3V_A
1.65V
C307 100nF
C306 3.3uF/10V
R324 100k-1%
GNDA
LM285M U304
GNDA
R325 33k-1%
Figure 3-8. Current Amplifier
Designer Reference Manual System Description More Information This Product, www.freescale.com
U301B MC33502D
I_sense_C2
I_sense_C1
1.65V 1.65V
I_sense_C
Imax
DRM018 Rev. MOTOROLA
System Description System Blocks Concept
shown Figure 3-7, currents cannot measured moment. example, current flows through Phase (and shunt resistor only transistor switched Likewise, current Phase measured transistor switched current Phase measured transistor switched moment current sensing, voltage shape analysis must done. voltage shapes different periods shown Figure 3-11. voltage shapes correspond center-aligned sinewave modulation. shown, best moment current sampling middle period, where bottom transistors switched exact moment sampling, DSP56F80x family offers ability synchronize modules SYNC signal. This exceptional hardware feature, patented Motorola, used current sensing. outputs synchronization pulse, which connected input synchronization module (Quad Timer counter/timer high-true pulse occurs each reload PWM, regardless state LDOK bit. intended purpose provide user-selectable delay between SYNC signal updating values. conversion process initiated SYNC input, which output TC2. time diagram automatic synchronization between shown Figure 3-9.
DRM018 Rev. MOTOROLA
Designer Reference Manual System Description More Information This Product, www.freescale.com
System Description
COUNTER SYNC
GENERATOR OUTPUTS
dead-time/2 dead-time/2
PINS
POWER STAGE VOLTAGE COUNTER OUTPUT CONVERSION
dead-time
dead-time
Figure 3-9. Time Diagram Synchronization However, three currents cannot measured from voltage shape. period Figure 3-11 shows moment when bottom transistor Phase switched very short time. on-time shorter than critical time, current accurately measured. critical time given hardware configuration (transistor commutation times, response delays processing
Designer Reference Manual System Description More Information This Product, www.freescale.com
DRM018 Rev. MOTOROLA
System Description System Blocks Concept
electronics, etc.). Therefore, only currents measured third current calculated from following equation:
3-5.)
PERIOD
RELOAD
PHASE_A PHASE_B PHASE_C critical pulse width
sampling point
Figure 3-10. Voltage Shapes Different Periods
DRM018 Rev. MOTOROLA System Description More Information This Product, www.freescale.com
Designer Reference Manual
System Description
duty cycle ratios
Phase Phase Phase
angle
Sector Sector Sector Sector Sector Sector
Figure 3-11. 3-phase Sinewave Voltages Corresponding Sector Value decision must about which phase current should calculated. simplest technique calculate current most positive voltage phase. example, Phase generates most positive voltage within section 60°, Phase within section 120°, Figure 3-11. this case, output voltages divided into sectors, shown Figure 3-11. current calculation then made according actual sector value. Sectors
3-6.)
Sectors
3-7.)
Designer Reference Manual System Description More Information This Product, www.freescale.com
DRM018 Rev. MOTOROLA
System Description System Blocks Concept
Sectors
3-8.)
NOTE:
sector value used current calculation only, other meaning sinewave modulation. type space vector modulation, sector value part space vector calculation.
3.4.3 Voltage Sensing DCBus voltage sensor represented simple voltage divider. DCBus voltage does change rapidly. nearly constant, with ripple given power supply structure. bridge rectifier used rectification line voltage, ripple frequency twice line frequency. power stage designed correctly, ripple amplitude should exceed nominal DCBus value. measured DCBus voltage must filtered eliminate noise. easiest fastest techniques first order filter, which calculates average filtered value recursively from last samples coefficient
DCBusFilt DCBusFilt DCBusFilt DCBusFilt
3-9.)
speed initialization voltage sensing (the filter exponential dependency with constant samples), moving average filter, which calculates average value from last samples, used initialization:
DCBusFilt
DCBus
3-10.)
3.4.4 Power Module Temperature Sensing measured power module temperature used thermal protection hardware realization shown Figure 3-12. circuit consists four diodes connected series, bias resistor, noise suppression
DRM018 Rev. MOTOROLA System Description More Information This Product, www.freescale.com
Designer Reference Manual
System Description
capacitor. four diodes have combined temperature coefficient mV/C. resulting signal, Temp_sense, back input, where software used safe operating limits. this application, temperature, Celsius, calculated according conversion equation:
Temp_sense temp
3-11.)
where:
temp
Power module temperature centigrades Diodes-dependent conversion constant Diodes-dependent conversion constant
Temp_senseVoltage drop diodes, which measured
+3.3V_A
2.2k
Temp_sense
BAV99LT1
BAV99LT1
100nF
Figure 3-12. Temperature Sensing
Designer Reference Manual System Description More Information This Product, www.freescale.com
DRM018 Rev. MOTOROLA
Designer Reference Manual 3-Ph. PMSM Torque Vector Control
Section Hardware Design
Contents
Hardware Set-up. DSP56F805EVM Controller Board 3-Ph BLDC Voltage Power Stage Motor-Brake Specifications. Hardware Documentation
Hardware Set-up
application Motorola's motor control DSPs using DSP56F803EVM, DSP56F805EVM, DSP56F807EVM, Motorola's 3-Phase AC/BLDC high voltage power stage BLDC high voltage motor with quadrature encoder integrated brake. components integral part Motorola's embedded motion control development tools. Application hardware set-up shown Figure 4-1.
DRM018 Rev. MOTOROLA Hardware Design More Information This Product, www.freescale.com
Designer Reference Manual
Hardware Design
Figure 4-1. High-Voltage Hardware System Configuration
Designer Reference Manual Hardware Design More Information This Product, www.freescale.com
DRM018 Rev. MOTOROLA
Hardware Design DSP56F805EVM Controller Board
system parts supplied documented these references: DSP56F805 Controller Board the: Supplied DSP56F805EVM Described DSP56F805 Evaluation Module Hardware User's Manual 3-phase AC/BLDC Low-Voltage Power Stage Described 3-phase Brushless Voltage Power Stage Manual Supplied with 3-phase AC/BLDC Voltage Power Stage (Order #ECLOVACBLDC) Motor-Brake SM40V SG40N Supplied Order #ECMTRLOVBLDC
NOTE:
application software targeted synchronous motor with sinewave Back-EMF shape. this demo application, BLDC motor used instead, availability BLDC motor (MB1). Although Back-EMF shape this motor ideal sinewave, controlled application software. drive parameters will ideal with PMSM motor with exact sinewave Back-EMF shape. detailed description individual board found appropriate DSP56F80x Evaluation Module User's Manual, Motorola site, http://www.motorola.com. User's Manual includes schematic board, description individual function blocks, bill materials. individual boards ordered from Motorola standard products.
DSP56F805EVM Controller Board
DSP56F805EVM used demonstrate abilities DSP56F805 provide hardware tool allowing development applications that DSP56F805. DSP56F805EVM evaluation module board that includes DSP56F805 part, peripheral expansion connectors, external memory
DRM018 Rev. MOTOROLA Hardware Design More Information This Product, www.freescale.com Designer Reference Manual
Hardware Design
interface. expansion connectors signal monitoring user feature expandability. DSP56F805EVM designed following purposes: Allowing users become familiar with features 56800 architecture. tools examples provided with DSP56F805EVM facilitate evaluation feature benefits family. Serving platform real-time software development. tool suite enables user develop simulate routines, download software on-chip on-board RAM, debug using debugger JTAG/OnCEport. breakpoint features OnCE port enable user easily specify complex break conditions execute user-developed software full-speed, until break conditions satisfied. ability examine modify user accessible registers, memory peripherals through OnCE port greatly facilitates task developer. Serving platform hardware development. hardware platform enables user connect external hardware peripherals. on-board peripherals disabled, providing user with ability reassign DSP's peripherals. OnCE port's unobtrusive design means that memory board chip available user.
DSP56F805EVM provides features necessary user write debug software, demonstrate functionality that software interface with customer's application-specific device(s). DSP56F805EVM flexible enough allow user fully exploit DSP56F805's features optimize performance their product, shown Figure 4-2.
Designer Reference Manual Hardware Design More Information This Product, www.freescale.com
DRM018 Rev. MOTOROLA
Hardware Design 3-Ph BLDC Voltage Power Stage
DSP56F805
RESET LOGIC RESET 4-Channel 10-bit
MODE/IRQ LOGIC
MODE/IRQ
RS-232 Interface
DSub 9-Pin
Program Memory 64Kx16-bit
Address, Data Control
Interface TIMER GPIO Peripheral Expansion Connector(s) Debug LEDs LEDs Over Sense Over Sense Zero Crossing Detect
Data Memory 64Kx16-bit Memory Expansion Connector(s) JTAG Connector
JTAG/OnCE
Primary UNI-3
DSub 25-Pin
Parallel JTAG Interface
Secondary UNI-3
Freq Crystal
XTAL/EXTAL
Power Supply 3.3V, 5.0V 3.3VA
Figure 4-2. Block Diagram DSP56F805EVM
3-Ph BLDC Voltage Power Stage
Motorola's embedded motion control series low-voltage (LV) brushless (BLDC) power stage designed 3-ph. BLDC Synchronous motors. operates from nominal 12-volt motor supply, delivers amps motor current from that deliver peak currents amps. combination with Motorola's embedded motion control series control boards, provides software development platform that allows algorithms written tested, without need design build power stage. supports wide variety algorithms controlling BLDC motors Synchronous motors.
DRM018 Rev. MOTOROLA Hardware Design More Information This Product, www.freescale.com
Designer Reference Manual
Hardware Design
Input connections made 40-pin ribbon cable connector J13. Power connections motor made with fast-on connectors J16, J17, J18. They located along back edge board, labeled Phase Phase Phase Power requirements with 12-volt power supply that 16-volt tolerance. Fast-on connectors used power supply. labeled +12V located back edge board. labeled located along front edge. Current measuring circuitry amps full scale. Both phase currents measured. cycle cycle overcurrent trip point amps. BLDC power stage both printed circuit board power substrate. printed circuit board contains MOSFET gate drive circuits, analog signal conditioning, low-voltage power supplies, some large passive power components. This board also 68HC705JJ7 microcontroller used board configuration identification. power electronics that need dissipate heat mounted power substrate. This substrate includes power MOSFETs, brake resistors, current-sensing resistors, capacitors, temperature sensing diodes. Figure shows block diagram.
POWER INPUT
BIAS POWER
BRAKE
SIGNALS TO/FROM CONTROL BOARD
MOSFET POWER MODULE GATE DRIVERS PHASE CURRENT PHASE VOLTAGE CURRENT VOLTAGE MONITOR BOARD BLOCK ZERO CROSS BACK-EMF SENSE MOTOR
Figure 4-3. Block Diagram
Designer Reference Manual Hardware Design More Information This Product, www.freescale.com
DRM018 Rev. MOTOROLA
Hardware Design Motor-Brake Specifications
electrical characteristics Table apply operation 25°C with 12-Vdc supply voltage. Table 4-1. Electrical Chatacteristics 3-Ph BLDC Voltage Power Stage
Characteristic Motor Supply Voltage Quiescent current Symbol VOut ISense VBus IRMS PBK(Pk) Pdiss Units mV/A mV/V
logic input voltage logic input voltage Analog output range current sense voltage voltage sense voltage Peak output current (300 Continuous output current Brake resistor dissipation (continuous) Brake resistor dissipation Total power dissipation
Motor-Brake Specifications
induction motor-brake incorporates 3-phase induction motor attached BLDC motor brake. induction motor four poles. incremental position encoder coupled motor shaft, position Hall sensors mounted between motor brake. They allow sensing position required control algorithm. Detailed motor-brake specifications listed Table 4-2. target application customer specific motor used.
DRM018 Rev. MOTOROLA Hardware Design More Information This Product, www.freescale.com
Designer Reference Manual
Hardware Design
Table 4-2. Motor Brake Specifications
Manufactured Motor Specification: Brno, Czech Republic eMotor Type: Pole-Number: Nominal Speed: AM40V 3-Phase Induction Motor 1300 0.88 SG40N 3-Phase BLDC Motor 1500 Baumer Electric 16.05A 1024-12-5 1024
Nominal Voltage: Nominal Current: Brake Specification: Brake Type: Nominal Voltage: Nominal Current: Pole-Number: Nominal Speed: Position Encoder Type: Pulses Revolution:
Hardware Documentation
system parts supplied documented according following references: Controller board DSP56F805: supplied DSP56805EVM described Evaluation Module Hardware User's Manual AC/BLDC Voltage Power Stage described Motorola Embedded Motion Control 3-Phase BLDC Low-Voltage Power Stage User's Manual MEMC3PBLDCLVUM/D
Designer Reference Manual Hardware Design More Information This Product, www.freescale.com
Motor-Brake AM40V SG40N
DRM018 Rev. MOTOROLA
Hardware Design Hardware Documentation
supplied ECMTRHIVAC Detailed descriptions individual boards found comprehensive User's Manuals belonging each board. manuals available Motorola web. User's Manual incorporates schematic board, description individual function blocks bill materials. individual board ordered from Motorola standard product.
DRM018 Rev. MOTOROLA Hardware Design More Information This Product, www.freescale.com
Designer Reference Manual
Hardware Design
Designer Reference Manual Hardware Design More Information This Product, www.freescale.com
DRM018 Rev. MOTOROLA
Designer Reference Manual 3-Ph. PMSM Torque Vector Control
Section Software Design
Contents
Main Software Flow Chart Data Flow State Diagram. Scaling Quantities. Controller Tuning Subprocesses Relation State Transitions
Main Software Flow Chart
main software flow chart incorporates Main routine entered from Reset (see Figure 5-1) Interrupt states (see Figure 5-2, Figure 5-4). Main routine includes initialization main loop. software consist processes: Application Control, Synchronous Motor (PMSM) Control, Analog sensing, Position Speed Measurement, Fault Control. Application Control process highest software level which precedes settings other software levels. input this level Run/Stop switch, Up/Down buttons manual control, master software (via registers shown Data Flow). This process handled Drive Control called from Main; Figure 5-1. PMSM Synchronous Motor) Control process provides most motor control functionality. executed mainly Current Processing. Current Processing called from Complete Interrupt
DRM018 Rev. MOTOROLA Software Design More Information This Product, www.freescale.com
Designer Reference Manual
Software Design
(see Figure 5-2) once reloads, with period 125µs. also each reload (62.5µs), master software recorder pcmasterdrvRecorder() must removed from code. speed measurment preformed from Quadrature Timer Interrupt (see Figure 5-4) with period PER_TMR_POS_SPEED_US (900µs). current control executed with high priority frequency calls. Analog sensing process handles sensing, filtering correction analog variables (phase currents, temperature, DCBus voltage). provided Analog Sensing Processing (see Figure 5-2) Analog Sensing Phase Set. Analog Sensing Phase split from Analog Sensing Processing because sets according svmSector variable, calculated after PMSM Control Current Processing. Position Speed Measurement processes provided hardware Timer modules functions giving actual speed position; Figure 3-2. Indication Processing called from Quadrature Timer Interrupt, which provides time base flashing. Fault Control process split into Background Fault ISR. Background (see Figure 5-1) checks Overheating, Undervoltage Position Sensing Faults. Fault part (see Figure 5-2) takes care Overvoltage Overcurrent Faults, which causes Fault interrupt. Brake Control process dedicated brake transistor control, which maintains DCBus voltage level. called from Main (see Figure 5-1). Up/Down Button processes split into Button Processing Interrupt, called from Quadrature Timer Interrupt (see Figure 5-4); Button Processing BackGround (inside Analog Sensing); Interrupt Button; Interrupt Down Button (see Figure 5-2).
Designer Reference Manual
DRM018 Rev. Software Design More Information This Product, www.freescale.com MOTOROLA
Software Design Main Software Flow Chart
Reset
Initialization
Fault Control Background: faultCtrlStatus AnalogFaultEnbl {check Undervoltage, Overheating faults} Position sensing,Overvoltage, Overcurrent faults {set appFaultStatus trigger beginning Fault State} Drive Control Processing: control/check switch trigger DriveStatus Run/Stop/Init/ PMSM Control Run/Stop Fault Control status Indication}
Figure 5-1. Software Flow Chart General Overview Check switch state routine handles manual switch control. This routine called regularly drive control processing state. responsible software control flow reading state RUN/STOP switch.
DRM018 Rev. MOTOROLA Software Design More Information This Product, www.freescale.com
Designer Reference Manual
Software Design
Interrupt Complete Analog Sensing- Processing according anSensingCtrlStatus sensing/initialization: {sense Temperature calculate Filtered Temperature sense, correct Phase Currents calculate Phase Currents sense Voltage correct Voltage calculate Filtered Voltage}
PMSM Control -Current Processing: proceeds according pmsmCtrlStatus generation: position from Position Measurement (theta_actual_el) (theta_actual_el) Current Control: Currents Transformation (a,b,c d-q) Current Regulator Current Regulator Voltages Transformation (d-q DCBus Ripple Compensation Space Vector Module sets pwmABC
PWM: duty cycles pwmABC
Analog Sensing-ADC Phase converter phase current samples (easily measured) phases
Return
Figure 5-2. Software Flow Chart interrupt
Designer Reference Manual Software Design More Information This Product, www.freescale.com DRM018 Rev. MOTOROLA
Software Design Main Software Flow Chart
Interrupt Fault Fault Control Fault part: Overcurrent Overvoltage: {set appFaultStatus Overvoltage Overcurrent triggers beginning Fault State (disable PWM.)}
Return
Figure 5-3. Software Flow Chart Fault interrupt
DRM018 Rev. MOTOROLA Software Design More Information This Product, www.freescale.com
Designer Reference Manual
Software Design
Interrupt QTimer Speed Measurement Processing
PMSM Control Torque, Alignment Processing: proceeds according status
speed from Speed Measurement
pmsmCtrlStatus? AlignFlag Alignment: Software Timer Timeout {PMSM Control Alignment} others RunFlag
Indication Processing
Return
Figure 5-4. Flow Chart General Overview
Data Flow
synchronous motor vector control drive control algorithm described data flow charts shown Figure Figure 5-6.
Designer Reference Manual Software Design More Information This Product, www.freescale.com
DRM018 Rev. MOTOROLA
Software Design Data Flow
variables constants described should clear from their names.
Start/Stop Switch
Up/Down Buttons
Master
Green
appPcmCtrlStatus i_Q_desired
appState
faultCtrlStatus appFaultStatus i_Q_desired
Application Control
pmsmCtrlStatus anSensingCtrlStatus
Indication
i_Sa, i_Sb, i_Sc u_dc_bus temperature temperature_filt
PHASEA,PHASEB,INDEX
Master Software
Position, Speed Measurement
theta_actual_el
Analog Sensing (Temperature, DCBus volt. Phase Currents a,b,c)
u_dc_bus
omega_actual_mech
i_Sabc_comp
svmSector u_dc_bus_filt i_Sd_Alignment I_SDQ_MAX SVM_INV_INDEX, u_Reserve_FW SVM_INV_INDEX, u_OverMax coefBEMF, coefBEMFShift Outputs
theta_align_el_C
PMSM Control
reloadSWtmrSpeedControl reloadSWtmrAlignment pwmABC
Generation
Pwm_AT
Pwm_AB
Pwm_BT
Pwm_BB
Pwm_CT
Pwm_CB
Figure 5-5. Data Flow Part
DRM018 Rev. MOTOROLA Software Design More Information This Product, www.freescale.com
Designer Reference Manual
Software Design
TEMPERATURE_MAX_F16 i_Sabc_comp
Faults
(Overvoltage/Overcurrent)
temperature_filt u_dc_bus_min_fault_C
Check Index Position
faultCtrlStatus
u_dc_bus_filt
Fault Control
pmsmCtrlStatus PWMEN
appFaultStatus Master Software
Generation
Outputs
Pwm_AT
Pwm_AB
Pwm_BT
Pwm_BB
Pwm_CT
Pwm_CB
Figure 5-6. Data Flow Part data flows consist processes described following sections.
5.3.1 Application Control Process Application Control process highest software level, which precedes settings other software levels. process state determined variable appState. application controlled either:
Designer Reference Manual Software Design More Information This Product, www.freescale.com
Manually From master software
DRM018 Rev. MOTOROLA
Software Design Data Flow
manual control, input this process Run/Stop switch Up/Down buttons. master software communicates omega_reqPCM_mech, which required angular speed from master software; appPcmCtrlStatus, which consists flags StartStopCtrl Start/Stop; RequestCtrl changing application's operating mode appOpMode manual control; appFaultStatus, indicating faults.
other processes controlled setting pmsmCtrlStatus, omega_required_mech, appPcmCtrlStatus, brakeCtrlStatus, faultCtrlStatus.
5.3.2 Indication Process This process controls flashing according appState.
5.3.3 Analog Sensing Process Analog sensing process handles sensing, filtering correction analog variables (phase currents, temperature, voltage).
5.3.4 Position Speed Measurement Process Position Speed Measurement process gives mechanical angular speed omega_actual_mech electrical position theta_actual_el.
5.3.5 PMSM Synchronous Motor) Control Process PMSM Synchronous Motor) Control process provides most motor control functionality. Figure shows data flow inside process PMSM Current control. shows essential subprocesses process: Sine; Cosine Transformations; Current Control; Speed; Alignment Control.
DRM018 Rev. MOTOROLA Software Design More Information This Product, www.freescale.com
Designer Reference Manual
Software Design
Sine Cosine Transformations generate sinCos_theta_el with components sine, cosine according electrical position theta_actual_el. provided look-up table. data flow inside process Current Control detailed Figure 5-7. measured phase currents i_Sabc_comp transformed into i_SDQ_lin using sinCos_theta_el; 2.4.3 Vector Control Transformations. Both components regulated independent regulators i_SDQ_desired values. outputs regulators u_SDQ_lin.
Designer Reference Manual Software Design More Information This Product, www.freescale.com
DRM018 Rev. MOTOROLA
Software Design Data Flow
i_Sabc_comp
sinCos_theta_el
Current Transformation a,b,c
i_SDQ_desired.q_axis u_LimitF16 i_SDQ.q_axis i_SDQ.d_axis i_SDQ_desired.d_axis I_SDQ_MAX_F16
Current Regulator
omega_actual_mech u_SDQ_lin.q_axis coefBEMF, coefBEMFShift
Current Regulator
u_SDQ_lin.d_axis pmsmCtrlStatus
Feed Forward
sinCos_theta_el u_SDQ
u_LimitF16
Voltage Transformation alpha, beta
SVM_INV_INDEX/2* *u_dc_bus_filt +u_OverMax
u_SAlphaBeta
Scaling DCBus Ripple Compensation
u_dc_bus_filt u_Salpha_RipElim SVM_INV_INDEX, u_OverMax
Space Vector Modulation
pwmABC svmSector
Figure 5-7. Data Flow PMSM Control Current Control
DRM018 Rev. MOTOROLA Software Design More Information This Product, www.freescale.com
Designer Reference Manual
Software Design
Feed Forward process provides following calculations:
u_SDQ.q_axis coefBEMF
coefBEMFShft
omega_actual_mech u_SDQ_lin.q_axis
5-1.)
u_SDQ.d_axis u_SDQ_lin.d_axis
5-2.)
u_SDQ voltages transformed into u_SAlphaBeta (see 2.4.3 Vector Control Transformations) Voltage Transformation process. Scaling DCBus Ripple Compensation block scales u_SAlphaBeta (according u_dc_bus_filt) u_Salpha_RipElim, described svmlimDcBusRip function Motor Control Library. space vector modulation process generates duty cycle pwmABC svmSector according u_Salpha_RipElim. u_LimitF16 voltage limit current controllers. u_OverMax constant used increase limitation u_SDQ voltages over maximum SVM_INV_INDEX/2*u_dc_bus_filt determined DCBus voltage space vector modulation. Although pwmABC will limited space vector modulation process functions, reserve might used field-weakening controller dynamics. stable state, u_SDQ voltages vector will exceed u_S_max_FWLimit. process controls i_SDQ_desired.q_axis current according PMSM Control Process Status. Alignment status, sets i_SDQ_desired.d_axis i_Sd_Alignment i_SDQ_desired.q_axis
5.3.6 Generation Process generation process controls generation signals, driving 3-phase inverter. input pwmABC, with three components scaled range <0,1> type Frac16. scaling (according module setting) module control DSP) provided driver.
Designer Reference Manual Software Design More Information This Product, www.freescale.com
DRM018 Rev. MOTOROLA
Software Design State Diagram
5.3.7 Fault Control Process Fault Control process checks Overheating, Undervoltage, Overvoltage, Overcurrent Position Sensing faults. Overheating Undervoltage checked comparisons temperature_filt TEMPERATURE_MAX_F16 u_dc_bus_filt u_dc_bus_min_fault_C, where u_dc_bus_min_fault_C initialized with U_DCB_MIN_FAULT_MAINS230_F16 U_DCB_MIN_FAULT_MAINS115_F16. Position Sensing fault checked with Check Index Position process. Overvoltage Overcurrent faults PWMA Fault interrupt.
State Diagram
software split into processes shown Data Flow. following processes described below: Application Control Sate Diagram PMSM Control State Diagram Fault Control State Diagram Analog Sensing State Diagram
processes start with Initialization state after Reset.
5.4.1 Initialization Initialization state: Initializes: Application Control Synchronous Motor Control Analog Sensing
DRM018 Rev. MOTOROLA Software Design More Information This Product, www.freescale.com Designer Reference Manual
Software Design
Fault Control Indication Sets manual application operating mode Enables masked interrupts Application Control: Initialization Triggers, which affected processes Begin Application Initialization state
5.4.2 Application Control State Diagram Application Control process detailed Figure 5-8.
Reset Initialization done switchState Stop Fault Control: faults cleared
Application Control:
Init Initializations proceeding appState APP_INIT
Application Control: Fault Fault Control: Begin Fault
appPcmCtrlStatus. RequestCtrl
switchState Stop initializations finished
done
switchState
Application Control: Stop appState APP_STOP done Application Control: Begin Stop appState APP_STOP done Application Control: appState APP_RUN Application Control: Begin appState APP_RUN
Application Control: Fault Begin clear pmsmCtrlStatus.RunFlag clear pmsmCtrlStatus.AlignFlag appState APP_FAULT
Fault Control: Begin Fault
switchState Stop
Figure 5-8. State Diagram Application Control
Designer Reference Manual Software Design More Information This Product, www.freescale.com DRM018 Rev. MOTOROLA
Software Design State Diagram
After reset, Initialization state entered. peripherals variables initialized this state, application Manual Control. When state finished, Application Control Init state follows. shown Figure 5-8, appState APP_INIT; subprocesses requiring initialization proceeding; disabled; voltage applied motor phases. appPcmCtrlStatus.RequestCtrl flag from master software. switchState Stop, Application Control enters Stop state.
switchState according manual switch master software register AppPcmCtrlStatus.StartStopCtrl, depending application operating mode. Stop state, appState APP_STOP disabled, voltage applied motor phases. When switchState Run, Begin state processed. there request change application operating mode, appPcmCtrlStatus.RequestCtrl application Init entered application operating mode request only accepted Init Stop state transition Init state. Begin state, processes provide settings state. state, enabled, voltage applied motor phases. motor running according state subprocesses. switchState Stop, Stop state entered. fault detected during Begin Fault state, which subprocess Fault control, Begin Fault state entered. sets appState APP_FAULT; disabled; subprocess PMSM Control Stop. Fault state only move onto Init state when switchState Stop, Fault Control subprocess successfully cleared faults.
5.4.3 PMSM Control State Diagram state diagram Commutation Control process illustrated Figure 5-9.
DRM018 Rev. MOTOROLA Software Design More Information This Product, www.freescale.com Designer Reference Manual
Software Design
Application Control: Init
PMSM Control:
Initialization
clear AlignInitDoneFlag Application Control: Begin Running PMSM Control: Stop Fault Begin Running AlignInitDoneFlag PMSM Control: Begin Alignment Alignment current Alignment timeout AlignFlag
done done
PMSM Control: Begin Stop Fault clear RunFlag clear AlignFlag
done
Application Control: Begin Stop/Fault
PMSM Control: Alignment timeout search Current ramp Alignment Timeout PMSM Control: Alignment Zero Position AlignInitDoneFlag clear AlignFlag
done PMSM Control:
PMSM Control: Begin RunFlag done
Figure 5-9. State Diagram PMSM Control When Application Control initializes, PMSM Control subprocess initialization state entered. AlignInitDoneFlag cleared, which means that alignment proceed. next PMSM Control state Begin Stop Fault. RunFlag AlignFlag cleared Stop Fault state entered. When Application Control: Begin Run, PMSM Control subprocess enters Begin Alignment Begin state, depending whether alignment initialization already proceeded (flagged AlignInitDoneFlag). alignment state necessary setting zero position position sensing; 3.4.1.4 Position Reset with Rotor Alignment. state Begin Alignment, Alignment current duration set; alignment provided setting desired current d_axis i_Sd_Alignment q_axis
Designer Reference Manual Software Design More Information This Product, www.freescale.com DRM018 Rev. MOTOROLA
Software Design State Diagram
alignment state provides current control timeout search. When alignment timeout occurs, Alignment entered. that state, Position Sensing Zero Position set, position sensor aligned with real vector rotor flux. When Alignment state ends, PMSM Control enters regular state, where motor running required speed. Application Control state Begin Stop Begin Fault, PMSM Control enters Begin Stop Fault, then Stop Fault.
5.4.4 Fault Control State Diagram state diagram Fault Control subprocess illustrated Figure 5-10. After initialization, fault conditions searched. fault occurs, appFaultStatus variable according detected error; switched (PWMEN Fault state entered. This state also causes Application Control: Fault state. faults successfully cleared, this signaled Application Control process. Fault state left when Application Control Init state entered.
DRM018 Rev. MOTOROLA Software Design More Information This Product, www.freescale.com
Designer Reference Manual
Software Design
Reset Fault Control:
Initialization
Application Control: Init Fault Control: Application Initialization clear appFaultStatus identification
done Fault Control: Fault searching faults
Fault: Undervoltage (filtered) Overheating (filtered) Overcurrent (fault pin) Overvoltage (fault pin) wrong Position Sensing fault
Fault Control: Begin Fault Application Control Begin Fault setting appFaultStatus PWMEN done Fault Control: Fault clear/test faults
Figure 5-10. State Diagram Fault Control
5.4.5 Analog Sensing State Diagram state diagram Analog Sensing subprocess shown Figure 5-11. Initialization state initializes hardware modules like ADC, synchronization with PWM, etc. Begin Init, Initialization started, variables initialization InitDoneFlag cleared. Init Proceed state, temperature, DCBus voltage phase current samples sensed summed. After required analog sensing, Init samples sensed, Init Finished state entered.
Designer Reference Manual Software Design More Information This Product, www.freescale.com DRM018 Rev. MOTOROLA
Software Design Scaling Quantities
There, samples' average calculated, from divided number analog sensing Init samples. According phase currents' average value, phase current offsets initialized. variable sensing initialized state Init Done entered, variables from analog sensing valid other processes. this state, temperature DCBus voltage filtered first order filters.
Reset
Analog Sensing Initialization Application Control: Begin Init Analog Sensing: Begin Init clear variables clear InitDoneFlag Application Control: Begin Init Analog Sensing Init Done, normal operation: done done Analog Sensing Init. Proceed: sense samples count samples samples counter analog sensing init samples Analog Sensing Init Finished: samples average current offsets InitDoneFlag
Figure 5-11. State Diagram Analog Sensing
Scaling Quantities
synchronous motor vector control application uses fractional representation real quantities except time. N-bit signed fractional format represented using 1.[N-1] format sign bit, fractional bits). Signed fractional numbers (SF) following range:
+1.0
5-3.)
DRM018 Rev. MOTOROLA Software Design More Information This Product, www.freescale.com
Designer Reference Manual
Software Design
words long-word signed fractions, most negative number that represented -1.0, whose internal representation $8000 $80000000, respectively. most positive word $7FFF 2-15, most positive long-word $7FFFFFFF 2-31. following equation shows relationship between real fractional representations:
Real Value Fractional Value -Real Quantity Range
5-4.)
where:
Fractional Value fractional representation real value [Frac16] Real Values real value quantity RPM, etc.] Real Quantity Range maximum quantity range, defined application RPM, etc.]
language standard does have fractional variable type defined. Therefore, fractional operations provided CodeWarrior intrinsics functions (e.g. mult_r() substitution fractional type variables, application uses types Frac16 Frac32. These fact defined integer 16-bit signed variables integer 32-bit signed variables. difference between Frac16 pure integer variables that Frac16 Frac32 declared variables should only used with fractional operations (intrinsics functions). recalculation from real fractional form Frac16, Frac32 value made with following equations:
Real Value Frac16 Value 32768 -Real Quantity Range
5-5.)
Frac16 16-bit signed value and:
Real Value Frac32 Value -Real Quantity Range
5-6.)
Designer Reference Manual Software Design More Information This Product, www.freescale.com
DRM018 Rev. MOTOROLA
Software Design Scaling Quantities
Frac32 32-bit signed value.
Real Value Fractional Value -Real Quantity Range
5-7.)
Fractional form, conversion from Fraction Value Frac16 Frac32 Value provided language macro.
5.5.1 Voltage Scaling Voltage scaling results from sensing circuits hardware used; details 3-Phase AC/BLDC Low-Voltage Power Stage User's Manual. Voltage quantities scaled maximum measurable voltage, which dependent hardware. relationship between real fractional representations voltage quantities
Real Frac -VOLT_RANGE_MAX
5-8.)
where:
uFrac uReal Fractional representation voltage Real voltage quantities physical units
VOLT_RANGE_MAXDefined voltage range maximum used scaling physical units
application, VOLT_RANGE_MAX value maximum measurable DCBus voltage: VOLT_RANGE_MAX application voltage variables scaled same (u_dc_bus, u_dc_bus_filt, u_SAlphaBeta, u_SDQ, u_SAlphaBeta, on).
DRM018 Rev. MOTOROLA Software Design More Information This Product, www.freescale.com
Designer Reference Manual
Software Design
5.5.2 Current Scaling Current scaling also results from sensing circuits hardware used; details 3-Phase AC/BLDC Low-Voltage Power Stage User's Manual. relationship between real fractional representation current quantities
Real Frac -CURR_RANGE_MAX
5-9.)
where:
iFrac iReal Fractional representation current quantities Real current quantities physical units
CURR_RANGE_MAXDefined current range maximum used scaling physical units[A]
application, CURR_RANGE_MAX value maximum measurable current: CURR_RANGE_MAX 5.86 application current variables scaled same (components i_Sabc_comp, i_SAlphaBeta, i_SDQ, i_SDQ_desired, i_Sd_Alignment forth).
NOTE:
shown 3-Phase AC/BLDC Low-Voltage Power Stage User's Manual, current sensing circuit provides measurement current range from CURR_MIN -2.93A CURR_MAX +2.93A, giving voltage input ranges from 3.3V with 1.65V offset. DSP5680x's converter able automatically cancel (subtract) offset. fractional representation measured current then range <-0.5, 0.5), while possible representation fractional value <-1,1), shown 5-5.). Therefore, CURR_RANGE_MAX calculated according following equation: 5-10.)
CURR_RANGE_MAX CURR_MAX-CURR_MIN CURR_MAX
Designer Reference Manual Software Design More Information This Product, www.freescale.com
DRM018 Rev. MOTOROLA
Software Design Scaling Quantities
5.5.3 Speed Scaling Speed quantities scaled defined speed range maximum, which should lower than speed variables application, higher than maximum mechanical speed drive. relationship between real fractional representation speed quantities
Real Frac -OMEGA_RANGE_MAX
5-11.)
where:
Frac Fractional representation speed quantities Real Real speed quantities physical units [rpm] OMEGA_RANGE_MAXDefined speed range maximum used scaling physical units[rpm]
application, OMEGA_RANGE_MAX value defined OMEGA_RANGE_MAX 6000rpm relation between speed scaling speed measurement with encoder described 3.4.1.2 Speed Sensing. final software, constant OMEGA_SCALE identical with scaling constant equations 3-3.) 3-4.), OMEGA_RANGE_MAX Max.
5.5.4 Position Scaling Position Scaling described 3.4.1.1 Position Sensing
5.5.5 Temperature Scaling shown 3.4.4 Power Module Temperature Sensing, temperature variable does have linear dependency.
DRM018 Rev. MOTOROLA Software Design More Information This Product, www.freescale.com
Designer Reference Manual
Software Design Controller Tuning
application consists four controllers. controllers used currents. controller's constants given simulation Mathlab were experimentally specified. detailed description controller tuning beyond scope this reference design.
Subprocesses Relation State Transitions
shown Data Flow State Diagram, software split into subprocesses according functionality. application code designed able extract individual processes, such Analog Sensing, them customer applications. language functions dedicated each process located place software, they easily used other applications. function naming usually starts with name process, example, AnalogSensingInitProceed(). State Diagram shows, processes' subprocesses', state transients have some mutual relations. example, Application Control: Begin Initialization condition transient Analog Sensing process: Init Done Begin Init state. code, interface between processes provided "trigger" functions. naming convention these functions <ProcessName><State>Trig(). functionality will explained following example: "trigger" function Process1StateTrig() called from process1. transient functions process2, process3,etc., which must triggered Process1State, inside Process1StateTrig().
Designer Reference Manual Software Design More Information This Product, www.freescale.com
DRM018 Rev. MOTOROLA
Designer Reference Manual 3-Ph. PMSM Torque Vector Control
Section System Setup
Contents
Application Description Application Set-Up Projects Files Application Build Execute Warning
Application Description
vector control algorithm calculated Motorola DSP56F805. algorithm generates 3-phase signals Permanent Magnet (PM) synchronous motor inverter according user-required inputs, measured calculated signals. concept PMSM drive incorporates following hardware components: BLDC motor-brake 3-phase AC/BLDC high voltage power stage DSP56F805EVM boards ECOPTINL In-line optoisolation box, which connected between host computer DSP56F805EVM
BLDC motor-brake incorporates 3-phase BLDC motor attached BLDC motor brake. BLDC motor poles. incremental position sensor (encoder) coupled motor shaft position Hall Sensors mounted between motor brake.
DRM018 Rev. MOTOROLA System Setup More Information This Product, www.freescale.com
Designer Reference Manual
System Setup
They allow position sensing required control algorithm. detailed motor-brake specifications listed Table 6-1.
NOTE:
application software targeted Synchronous motor with sine-wave Back-EMF shape. this particular demo application, BLDC motor used instead, availability BLDC motor-Brake SM40V+SG40N, supplied ECMTRHIVBLDC. Although Back-EMF shape this motor ideally sine-wave, controlled application software. drive parameters will improved when PMSM motor with exact sine-wave Back-EMF shape used.
Table 6-1. Motor-Brake Specifications
Motor Type Speed Range Motor Characteristics Max. Electrical Power Phase Voltage Phase Current Speed Range Input Voltage Drive Characteristics Voltage Control Algorithm Optoisolation Motor Type Motor Characteristics Speed Range Max. Electrical Power poles, 3-phase, star connected, BLDC motor 2500 310V) 3*220V 0.55A 2500 310V Current Closed Loop Control Required poles,3-phase, star connected, BLDC motor 2500 310V)
drive controlled different operating modes: Manual operating mode required speed UP/DOWN push buttons drive started stopped RUN/STOP switch board.
Designer Reference Manual System Setup More Information This Product, www.freescale.com
DRM018 Rev. MOTOROLA
System Setup Application Description
master software operating mode required torque producing current master software.
Measured quantities: voltage Phase currents (phase phase phase Power module temperature Rotor speed
faults used drive protection: Overvoltage master software error message Overvoltage fault) Undervoltage master software error message Undervoltage fault) Overcurrent master software error message Overcurrent fault) Overheating master software error message Overheating fault)
6.2.1 Drive Protection voltage, current power stage temperature measured during control process. They protect drive from over voltage, undervoltage, overcurrent overheating. undervoltage overheating protection performed software, while overcurrent over voltage fault signal utilizes fault input DSP. power stage identified using board identification. correct power stage identified, fault "Wrong Power Stage" disables drive operation. Line voltage measured during application initialization application automatically adjusts itself either 115V 230V depending measured value. above-mentioned faults occur, motor control outputs disabled protect drive, application enters FAULT state. FAULT state left only when fault conditions
DRM018 Rev. MOTOROLA System Setup More Information This Product, www.freescale.com
Designer Reference Manual
System Setup
disappear RUN/STOP switch moved STOP position manual mode master software master software remote mode. application External Flash 3-Phase AC/BLDC Low-Voltage Power Stage powered Manual master software Operating Mode
correct power stage voltage level identified automatically appropriate constants set. 3-phase synchronous motor control application operate modes: Manual Operating Mode drive controlled RUN/STOP switch (S6). motor torque producing current (S2-IRQB) DOWN (S1-IRQA) push buttons; Figure 6-1. application runs motor spinning disabled (i.e., system ready) USER (LED3, shown Figure 6-2) will blink. When motor spinning enabled, USER Refer Table application states.
Designer Reference Manual System Setup More Information This Product, www.freescale.com
DRM018 Rev. MOTOROLA
System Setup Application Description
Figure 6-1. RUN/STOP Switch UP/DOWN Buttons DSP56F805EVM
Figure 6-2. USER LEDs DSP56F805EVM
DRM018 Rev. MOTOROLA System Setup More Information This Product, www.freescale.com
Designer Reference Manual
System Setup
Table 6-2. Motor Application States
Application State Stopped Running Fault Motor State Stopped Spinning Stopped Green State Blinking frequency Blinking frequency
master software drive controlled remotely from through communication channel device RS-232 physical interface. drive enabled RUN/STOP switch, which used safely stop application time. master software enables required torque producing current motor. following master software control actions supported, master software displays following information: Required torque producing current motor Actual torque producing current motor Application status Init/Stop/Run/Fault voltage level Identified line voltage Fault Status Identified Power Stage
Start master software window's application, 3ph_pmsm_vector_control.pmp. Figure illustrates master software control window after this project been launched.
NOTE:
master software project (.pmp file) unable control application, possible that wrong load (.elf file) been selected. master software uses load determine addresses global variables being monitored. Once master
Designer Reference Manual System Setup More Information This Product, www.freescale.com
DRM018 Rev. MOTOROLA
System Setup Application Set-Up
software project been launched, this option selected master software window under Project/Select Other FileReload.
Figure 6-3. Master Software Control Window
Application Set-Up
Figure illustrates hardware set-up 3-phase Synchronous Motor Control application.
DRM018 Rev. MOTOROLA System Setup More Information This Product, www.freescale.com
Designer Reference Manual
System Setup
Figure 6-4. Set-up 3-phase Synchronous Motor Control Application using DSP56F805EVM correct order phases (phase phase phase Synchronous motor phase white wire phase wire phase black wire
When facing motor shaft, phase order phase phase phase motor shaft should rotate clockwise (i.e., positive direction, positive speed).
Designer Reference Manual System Setup More Information This Product, www.freescale.com
DRM018 Rev. MOTOROLA
System Setup Application Set-Up
detailed information, DSP56F805 Evaluation Module Hardware Reference Manual. serial cable needed master software debugging/control. system consists following components: BLDC Motor Type 40V, Brno s.r.o., Czech Republic Load Type 40N, Brno s.r.o., Czech RepublicDSP56F805 Board: Encoder 16.05A1024-12-5, Baumer Electric, Switzerland 3-ph BLDC Power Stage 180W Serial cable needed master software debugging tool only. parallel cable needed Metrowerks Code Warrior debugging loading. Command Converter Cable needed DSP56F805 Controller Board only.
detailed information, refer dedicated application note (see References).
6.3.1 Application Setup Using DSP56F805EVM execute Three-Phase Synchronous Motor Vector Control, DSP56F805EVM board requires strap settings shown Figure Table 6-3.
DRM018 Rev. MOTOROLA System Setup More Information This Product, www.freescale.com
Designer Reference Manual
System Setup
JG10
USER JG14
JG14 JG12
JG13
JG12
JG13
JG15
JG10
JG17
DSP56F805EVM
JG18
JTAG
JG16
JG15
JG16
RUN/STOP JG11
LED3
IRQA
IRQB
RESET
JG18 JG17
JG11
Figure 6-5. DSP56F805EVM Jumper Reference
Table 6-3. DSP56F805EVM Jumper Settings
Jumper Group Comment input selected high input selected high Primary UNI-3 serial selected Secondary UNI-3 serial selected Enable on-board parallel JTAG Command Converter Interface on-board crystal oscillator input Select DSP's Mode operation upon exit from reset Enable on-board SRAM Enable RS-232 output Connections 1-2, 3-4, 5-6, 1-2, 3-4, 5-6,
Designer Reference Manual System Setup More Information This Product, www.freescale.com
DRM018 Rev. MOTOROLA
System Setup Projects Files
Table 6-3. DSP56F805EVM Jumper Settings
Jumper Group JG10 JG11 JG12 JG13 JG14 Comment Secondary UNI-3 Analog temperature input unused Host power Host target interface Primary Encoder input selected Hall Sensor signals Secondary Encoder input selected Primary UNI-3 3-Phase Current Sense selected Analog Inputs Secondary UNI-3 Phase Overcurrent selected FAULTA1 Secondary UNI-3 Phase Overcurrent selected FAULTB1 termination unselected on-board crystal oscillator input Connections 2-3, 5-6, 2-3, 5-6, 2-3, 5-6,
JG15 JG16 JG17 JG18
NOTE:
When running target system stand-alone mode from Flash, jumper must configuration disable command converter parallel port interface.
Projects Files
Three-Phase Synchronous Motor Torque Vector Control application composed following files: .\3pmsm_tvc_sa\3pmsm_tvc.c, main program .\3pmsm_tvc_sa\3pmsm_tvc.mcp, application project file application configuration file linker command file external linker command file Flash configuration file Flash
DRM018 Rev. MOTOROLA System Setup More Information This Product, www.freescale.com
Designer Reference Manual
System Setup
master software file
These files located application folder. .\controller_new.c, source header files controller .\ramp.c, source header files ramp generation .\svm.c, source header files space vector modulation .\cptrfm.c, source header files Clark Park transformation .\mfr16.c, mfr32.c, mfr32sqrt.asm, portasm.h: source, header files providing fractional math intrinsics
necessary resources (algorithms peripheral drivers) part application project file. .\3pmsm_tvc\src\include, folder general C-header files .\3pmsm_tvc\src\dsp56805, folder device specific source files, e.g. drivers folder master software source files .\3pmsm_tvc\src\algorithms\, folder algorithms
Application Build Execute
When building Three-Phase Synchronous Motor Vector Control, user create application that runs from internal Flash External RAM. select type application build, open 3ph_pmsm_vector_control.mcp project select target build type, shown Figure 6-6. definition projects associated with these target build types viewed under Targets project window.
Designer Reference Manual System Setup More Information This Product, www.freescale.com
DRM018 Rev. MOTOROLA
System Setup Application Build Execute
Figure 6-6. Target Build Selection project built executing Make command, shown Figure 6-7. This will build link Three-Phase Synchronous Motor Torque Vector Control Application.
Figure 6-7. Execute Make Command
DRM018 Rev. MOTOROLA System Setup More Information This Product, www.freescale.com
Designer Reference Manual
System Setup
execute Three-Phase Synchronous Motor Vector Control application, select Project\Debug CodeWarrior IDE, followed command. more help with these commands, refer CodeWarrior tutorial documentation following file located CodeWarrior installation folder: <.>\CodeWarrior Flash target selected, CodeWarrior will automatically program internal Flash with executable generated during Build. External target selected, executable will loaded off-chip RAM. Once Flash been programmed with executable, target system stand-alone mode from Flash. this, jumper configuration disable parallel port, press RESET button. Once application running, move RUN/STOP switch position required speed using UP/DOWN push buttons. Pressing UP/DOWN buttons should incrementally increase motor speed until reaches maximum speed. successful, motor will spinning.
NOTE:
RUN/STOP switch position when application starts, toggle RUN/STOP switch between STOP positions enable motor spinning. This protection feature that prevents motor from starting when application executed from CodeWarrior. should also lighted green LED, which indicates that application running. application stopped, green will blink frequency. Undervoltage fault occurs, green will blink frequency 8Hz.
Warning
This application operates environment that includes dangerous voltages rotating machinery.
Designer Reference Manual System Setup More Information This Product, www.freescale.com
DRM018 Rev. MOTOROLA
System Setup Warning
aware that application power stage optoisolation board electrically isolated from mains voltage they live with risk electric shock when touched. isolation transformer should used when operating power line. isolation transformer used, power stage grounds oscilloscope grounds different potentials, unless oscilloscope floating. Note that probe grounds and, therefore, case floated oscilloscope subjected dangerous voltages.
user should aware that: Before moving scope probes, making connections, etc., generally advisable power down high-voltage supply. avoid inadvertently touching live parts, plastic covers. When high voltage applied, using only hand operating test setup minimizes possibility electrical shock. Operation setups that have grounded tables and/or chairs should avoided. Wearing safety glasses, avoiding ties jewelry, using shields, operation personnel trained high-voltage techniques also advisable. Power transistors, coil, motor reach temperatures enough cause burns. When powering down; storage capacitors, dangerous voltages present until power-on off.
DRM018 Rev. MOTOROLA System Setup More Information This Product, www.freescale.com
Designer Reference Manual
System Setup
Designer Reference Manual System Setup More Information This Product, www.freescale.com
DRM018 Rev. MOTOROLA
Designer Reference Manual 3-Ph. PMSM Torque Vector Control
Appendix References
Design Brushless Permanent-magnet Motors, J.R. Hendershot T.J.E. Miller, Magna Physics Publishing Clarendon Press, 1994
Sensorless Vector Direct Torque Control, (1998), Oxford University Press, ISBN 0-19-856465-1, York. DSP56F80x 16-bit Digital Signal Processor, User's Manual, DSP56F801-7UM/D, Motorola, 2001 DSP56F800 16-bit Digital Signal Processor, Family Manual, DSP56F800FM/D, Motorola, 2001 3-Phase AC/BLDC Low-Voltage Power Stage User's Manual, MEMC3PBLDCLVUM/D Motorola, 2000 User's Manual master software, Motorola, 2001 Evaluation Motor Board User's Manual, MEMCEVMBUM/D, Motorola Motorola Embedded Motion Optoisolation Board User's Manual, MEMCOBUM/D, Motorola, 2000 Parallel Command Converter Hardware User's Manual, MCSL, MC108UM2R1 CodeWarrior Motorola DSP56800 Embedded Systems, CWDSP56800, Metrowerks, 2001.
DRM018 Rev. MOTOROLA References More Information This Product, www.freescale.com
Designer Reference Manual
References
Designer Reference Manual References More Information This Product, www.freescale.com
DRM018 Rev. MOTOROLA
Designer Reference Manual 3-Ph. PMSM Torque Vector Control
Appendix Glossary
Alternating Current Analogue-to-Digital Converter
brush component transfering elektrical power from non-rotational terminals, mounted stator, rotor. BLDC Brushless motor commutation process providing creation rotation field switching power transistor (electronic replacement brush commutator). commutator mechanical device alternating current commutator motor providing rotation commutator motor. Computer Operating Properly timer Direct Current Digital Signal Prosessor DSP56F80x Motorola family 16-bit DSPs dedicated motor control. "Dead Time (DT)" Dead Time (DT) short time that must inserted between turning transistor inverter half bridge turning complementary transistor limited switching speed transistors. duty cycle ratio amount time signal versus time off. Duty cycle usually represented percentage. GPIO General Purpose Input/Output
DRM018 Rev. MOTOROLA Glossary More Information This Product, www.freescale.com Designer Reference Manual
Glossary
Hall Sensors position sensor giving defined events (each electrical degrees) electrical revolution (for 3-phase motor). High Voltage interrupt temporary break sequential execution program respond signals from peripheral devices executing subroutine. input/output (I/O) Input/output interfaces between computer system external world. reads input sense level external signal writes output change level external signal. JTAG Interface allowing On-Chip Emulation Programming Lignt Emiting Diode logic voltage level approximately equal input power voltage (VDD). logic voltage level approximately equal ground voltage (VSS). Voltage controller Proportional-Integral controller phase-locked loop (PLL) clock generator circuit which voltage controlled oscillator produces oscillation which synchronized reference signal. Permanent Magnet PMSM Permanent Magnet Synchronous Motor Pulse Width Modulation Quadrature Decoder module providing decoding position from quadrature encoder mounted motor shaft. Quad Timer module with four 16-bit timers reset force device known condition.
Designer Reference Manual
DRM018 Rev. Glossary More Information This Product, www.freescale.com MOTOROLA
Glossary
Revolutions minute "serial communication interface module (SCI)" serial communications interface module (SCI) module that supports asynchronous communication. serial peripheral interface module (SPI) module that supports synchronous communication. software Instructions data that control operation microcontroller. software interrupt (SWI) instruction that causes interrupt associated vector fetch. "serial peripheral interface module (SPI)." timer module used relate events system point time.
DRM018 Rev. MOTOROLA
Designer Reference Manual Glossary More Information This Product, www.freescale.com
Glossary
Designer Reference Manual Glossary More Information This Product, www.freescale.com
DRM018 Rev. MOTOROLA
More Information This Product, www.freescale.com
REACH USA/EUROPE/LOCATIONS LISTED: Motorola Literature Distribution; P.O. 5405, Denver, Colorado 80217 1-303-675-2140 1-800-441-2447 JAPAN: Motorola Japan Ltd.; SPS, Technical Information Center, 3-20-1, Minami-Azabu Minato-ku, Tokyo 106-8573 Japan 81-3-3440-3569 ASIA/PACIFIC:
Motorola Semiconductors H.K. Ltd.; Silicon Harbour Centre, King Street, Industrial Estate, N.T., Hong Kong 852-26668334 TECHNICAL INFORMATION CENTER: 1-800-521-6274 HOME PAGE:
Information this document provided solely enable system software implementers Motorola products. There express implied copyright licenses granted hereunder design fabricate integrated circuits integrated circuits based information this document. Motorola reserves right make changes without further notice products herein. Motorola makes warranty, representation guarantee regarding suitability products particular purpose, does Motorola assume liability arising application product circuit, specifically disclaims liability, including without limitation consequential incidental damages. "Typical" parameters which provided Motorola data sheets and/or specifications vary different applications actual performance vary over time. operating parameters, including "Typicals" must validated each customer application customer's technical experts. Motorola does convey license under patent rights rights others. Motorola products designed, intended, authorized components systems intended surgical implant into body, other applications intended support sustain life, other application which failure Motorola product could create situation where personal injury death occur. Should Buyer purchase Motorola products such unintended unauthorized application, Buyer shall indemnify hold Motorola officers, employees, subsidiaries, affiliates, distributors harmless against claims, costs, damages, expenses, reasonable attorney fees arising directly indirectly, claim personal injury death associated with such unintended unauthorized use, even such claim alleges that Motorola negligent regarding design manufacture part.
Motorola Stylized Logo registered U.S. Patent Trademark Office. digital trademark Motorola, Inc. other product service names property their respective owners. Motorola, Inc. Equal Opportunity/Affirmative Action Employer.
Motorola, Inc. 2003
DRM018/D
More Information This Product, www.freescale.com

Other recent searches


TPS72518EVM - TPS72518EVM   TPS72518EVM Datasheet
SP8481 - SP8481   SP8481 Datasheet
SP410 - SP410   SP410 Datasheet
RT9266 - RT9266   RT9266 Datasheet
LM3875 - LM3875   LM3875 Datasheet
HMC300LM1 - HMC300LM1   HMC300LM1 Datasheet
AMMC-5040 - AMMC-5040   AMMC-5040 Datasheet
2N4427 - 2N4427   2N4427 Datasheet

 

Privacy Policy | Disclaimer
© 2012 Datasheet Archive