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 Switched Reluctance Motor Drive Control with Encoder Using 56F


Datasheet Thumbnail

  

Download PDF



Top Searches for this datasheet




3-Phase Switched Reluctance Motor Drive Control with Encoder Using 56F805
Designer Reference Manual
56800
Hybrid Controller
DRM031/D Rev. 03/2003
MOTOROLA.COM/SEMICONDUCTORS
More Information This Product, www.freescale.com
More Information This Product, www.freescale.com
3-Phase Switched Reluctance motor Control with Encoder Using 56F805
Designer Reference Manual Rev.
Peter Balazovic Motorola Czech System Laboratories Roznov Radhostem, Czech Republic
DRM031 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 revision Description Page Number(s)
Designer Reference Manual
DRM031 Rev. MOTOROLA
More Information This Product, www.freescale.com
Designer Reference Manual 3-Ph. Motor Control with Encoder
List Sections
Section Introduction Section Target Motor Theory
Section Switched Reluctance Motor Control Techniques with Encoder Position Sensor. Section System Description. Section Hardware Design. Section Software Design Section System Setup Appendix References. Appendix Glossary.
DRM031 Rev. MOTOROLA
Designer Reference Manual
More Information This Product, www.freescale.com
List Sections
Designer Reference Manual
DRM031 Rev. MOTOROLA
More Information This Product, www.freescale.com
Designer Reference Manual 3-Ph. Motor Control with Encoder
Table Contents
Section Introduction
Contents Application Benefit Motorola Advantages Features
Section Target Motor Theory
Contents Switched Reluctance Motor Mathematical Description Motor Digital Control Motor Voltage Current Control Motors
Section Switched Reluctance Motor Control Techniques with Encoder Position Sensor
Contents Encoder Sensor Commutation Angle Calculation Commutation Strategy Current Controller
Section System Description
Contents System Outline
DRM031 Rev. MOTOROLA
Designer Reference Manual
More Information This Product, www.freescale.com
Table Contents
Application Description
Section Hardware Design
Contents System Configuration DSP56F805EVM Controller Board 3-Phase High-Voltage Power Stage Optoisolation Board Motor-Brake Specifications. Hardware Documentation
Section Software Design
Contents Data Flow State Diagram. Software Design Scaling Quantities. Velocity Calculation
Section System Setup
Contents Application Outline Application Description Application Setup Project Files Application Build Execute Warning
Designer Reference Manual
DRM031 Rev. MOTOROLA
More Information This Product, www.freescale.com
Appendix References Appendix Glossary
DRM031 Rev. MOTOROLA
Designer Reference Manual
More Information This Product, www.freescale.com
Table Contents
Designer Reference Manual
DRM031 Rev. MOTOROLA
More Information This Product, www.freescale.com
Designer Reference Manual 3-Ph. Motor Control with Encoder
List Figures
Figure 2-10 4-10 Title Page
3-Phase Motor Phase Energizing Magnetization Characteristics Motor Electrical Diagram Motor Phase 3-Phase Power Stage. Soft Switching Hard Switching. Voltage Control Technique Voltage Control Technique Voltage Current Profiles. Current Control Technique Current Control Technique Voltage Current Profiles Quadrature Encoder Signals Commutation Angle Calculation Commutation Strategy Phase Voltage Generation System Concept Start-Up Sequence Quadrature Encoded Signals Decoder Timer Arrangement Commutation Algorithm Flowchart Current Controller Utilization. Shunt Resistors Current Sensors Soft Switching Current Sensed Phase Current Measured Current Shunt Resistors Measured 3-Phase Currents without with Implemented Noise Correction 4-11 Temperature Sensing Topology 3-Phase High Voltage Platform Configuration Block Diagram DSP56F805EVM 3-ph. Power Stage
DRM031 Rev. MOTOROLA
Designer Reference Manual
More Information This Product, www.freescale.com
List Figures
Inductance Characteristic System Data Flow Motor Control System Data Flow Converter. Application State Diagram Software Design General Overview Electrical Angle Definition RUN/STOP Switch UP/DOWN Buttons DSP56F805EVM USER LEDs DSP56F805EVM Master Software Control Window Setup 3-Phase Motor Control Application Using DSP56F805EVM DSP56F805EVM Jumper Reference Target Build Selection. Execute Make Command
Designer Reference Manual
DRM031 Rev. MOTOROLA
More Information This Product, www.freescale.com
Designer Reference Manual 3-Ph. Motor Control with Encoder
List Tables
Table Title Page
Memory Configuration Commutation Sequence Reference Phase Electrical Characteristics Power Stage. Electrical Characteristics Optoisolation Board Motor Brake Specifications. Motor Application States. DSP56F805EVM Jumper Settings
DRM031 Rev. MOTOROLA
Designer Reference Manual
More Information This Product, www.freescale.com
List Tables
Designer Reference Manual
DRM031 Rev. MOTOROLA
More Information This Product, www.freescale.com
Designer Reference Manual 3-Ph. Motor Control with Encoder
Section Introduction
Contents
Application Benefit Motorola Advantages Features
Application Benefit
This Designer Reference Manual describes design advanced 3-phase Switched Reluctance (SR) motor drive. based Motorola's DSP56F80x family dedicated motor control devices. motors gaining wider popularity among variable speed drives. This their simple low-cost construction characterized absence magnets rotor winding, high level performance over wide range speeds, fault-tolerant power stage design. numerous applications, availability moderate cost necessary electronic components, drives make viable alternative other commonly used motors like BLDC, synchronous universal motors. concept this application advanced speed closed loop drive with encoder position sensor. inner current loop with controller included. encoder position sensor provides accurate measurement actual rotor position necessary proper commutation. This application serves example advanced motor control. application helps start development advanced drive dedicated targeted application. This Designer Reference Manual includes description Motorola features, basic motor theory, system design concept, hardware
DRM031 Rev. MOTOROLA Introduction More Information This Product, www.freescale.com
Designer Reference Manual
Introduction
implementation, software design including software visualization tool.
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 Switched Reluctance 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 totalling pins: Timer with pins Timer with pins Module with 2-pin ports used transmit receive Serial Communications 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
Designer Reference Manual Introduction More Information This Product, www.freescale.com
DRM031 Rev. MOTOROLA
Introduction Motorola Advantages Features
Fourteen dedicated General Purpose (GPIO) pins, multiplexed GPIO pins External reset hardware reset JTAG/On-Chip Emulation (OnCE) Software-programmable, Phase-Locked-Loop-based frequency synthesizer core clock Table 1-1. Memory Configuration
DSP56F801 Program Flash Data Flash Program Data Boot Flash 8188 16-bit 16-bit 16-bit 16-bit 16-bit
DSP56F803 32252 16-bit 16-bit 16-bit 16-bit 16-bit
DSP56F805 32252 16-bit 16-bit 16-bit 16-bit 16-bit
DSP56F807 61436 16-bit 16-bit 16-bit 16-bit 16-bit
most interesting peripherals, from switched reluctance 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
DRM031 Rev. MOTOROLA Introduction More Information This Product, www.freescale.com
Designer Reference Manual
Introduction
bits resolution Half-cycle reload capability Integral reload rates from Individual software-controlled output Programmable fault protection Polarity control 20mA current sink capability pins Write-protectable registers
motor control application utilizes module independent mode, permitting fully independent generation control signals switches power stage. addition generators, outputs controlled separately software, allowing setting control signal logical Thus, state control signals changed instantly given rotor position (phase commutation) without changing contents value registers. This change made asynchronously with duty cycle update. 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
DRM031 Rev. MOTOROLA
Introduction Motorola Advantages Features
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
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.
DRM031 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
DRM031 Rev. MOTOROLA
Designer Reference Manual 3-Ph. Motor Control with Encoder
Section Target Motor Theory
Contents
Switched Reluctance Motor Mathematical Description Motor Digital Control Motor Voltage Current Control Motors
Switched Reluctance Motor
Switched Reluctance (SR) motor rotating electric machine where both stator rotor have salient poles. stator winding comprised coils, each which wound pole. rotor created from lamination order minimize eddy-current losses. motors differ number phases wound stator. Each them certain number suitable combinations stator rotor poles. Figure illustrates typical 3-phase motor with (stator/rotor) pole configuration.
DRM031 Rev. MOTOROLA Target Motor Theory More Information This Product, www.freescale.com
Designer Reference Manual
Target Motor Theory
Phase
Phase
Phase Stator poles)
Stator Winding
Rotor poles) Aligned position Phase
Figure 2-1. 3-Phase Motor motor excited sequence current pulses applied each phase. individual phases consequently excited, forcing motor rotate. current pulses need applied respective phase exact rotor position relative excited phase. When pair rotor poles exactly line with stator poles selected phase, phase said aligned position, i.e., rotor position maximal stator inductance (see Figure 2-1). interpolar axis rotor in-line with stator poles selected phase, phase said unaligned position rotor position minimal stator inductance. inductance profile motors triangular shaped, with maximum inductance when aligned position minimum inductance when unaligned. Figure illustrates idealized triangular-like inductance profile three phases motor with phase highlighted. individual Phases shifted electrically 120o relative each other. interval, when respective phase powered, called dwell angle dwell. defined turn-on turn-off angle.
Designer Reference Manual Target Motor Theory More Information This Product, www.freescale.com
DRM031 Rev. MOTOROLA
Target Motor Theory Switched Reluctance Motor
When voltage applied stator phase, motor creates torque direction increasing inductance. When phase energized minimum inductance position, rotor moves forthcoming position maximal inductance. movement defined magnetization characteristics motor. typical current profile constant phase voltage shown Figure 2-2. constant phase voltage phase current maximum position when inductance starts increase. This corresponds position when rotor stator poles start overlap. When phase turned off, phase current falls zero. phase current present region decreasing inductance generates negative torque. torque generated motor controlled applied phase voltage appropriate definition switching turn-on turn-off angles. more details, Miller, T.J.E., Switched Reluctance Motors Their Control. apparent from description, motor requires position feedback motor phase commutation. many cases, this requirement addressed using position sensors, like encoders, Hall sensors, etc. result that implementation mechanical sensors increases costs decreases system reliability. Traditionally, developers motion control products have attempted lower system costs reducing number sensors. variety algorithms sensorless control have been developed, most which involve evaluation variation magnetic circuit parameters that dependent rotor position, AN1912/D Motorola Inc.
DRM031 Rev. MOTOROLA Target Motor Theory More Information This Product, www.freescale.com
Designer Reference Manual
Target Motor Theory
Aligned Stator Phase Rotor
Unaligned
Aligned
iphA
position time
phase energizing
dwell on_phA off_phA
position time
Figure 2-2. Phase Energizing motor itself cost machine simple construction. High-speed operation possible, thus motor suitable high speed applications, like vacuum cleaners, fans, white goods, etc. discussed above, disadvantage motor need shaft-position information proper switching individual phases. Also, motor structure causes noise torque ripple. greater number poles, smoother torque ripple, motor construction control electronics become more expensive. Torque ripple also reduced advanced control techniques, such phase current profiling.
Mathematical Description Motor
motor highly non-linear system, non-linear theory describing behavior motor developed. Based this theory, mathematical model created. hand, enables simulation motor systems, other hand, makes
Designer Reference Manual Target Motor Theory More Information This Product, www.freescale.com
DRM031 Rev. MOTOROLA
Target Motor Theory Mathematical Description Motor
development implementation sophisticated algorithms controlling motors easier. electromagnetic circuit motor characterized non-linear magnetization. Figure illustrates magnetization characteristic specific motor. function between magnetic flux phase current motor position influence phase current mostly apparent aligned position, where saturation effects observed.
magnetization characteristics curve defines non-linearity motor. torque generated motor phase function magnetic flux, therefore phase torque constant constant phase current different motor positions. This creates torque ripple noise motor.
Figure 2-3. Magnetization Characteristics Motor mathematical model motor developed. model based electrical diagram motor, incorporating phase resistance phase inductance. diagram phase illustrated Figure 2-4.
DRM031 Rev. MOTOROLA Target Motor Theory More Information This Product, www.freescale.com Designer Reference Manual
Target Motor Theory
Lph=f()
Figure 2-4. Electrical Diagram Motor Phase According Figure 2-4, voltage applied phase motor described voltage drops phase resistance induced voltages phase inductance:
2-1.)
where:
uLph voltage applied phase phase resistance phase current induced voltage over phase inductance.
equation 2-1.) supposes that phases independent have mutual influence. induced voltage uLph defined magnetic flux linkage that function phase current rotor position induced voltage expressed
2-2.)
Designer Reference Manual Target Motor Theory More Information This Product, www.freescale.com
DRM031 Rev. MOTOROLA
Target Motor Theory Mathematical Description Motor
Then phase voltage expressed
2-3.)
2-4.)
where:
angular speed motor.
torque generated phase expressed
2-5.)
mathematical model motor then represented system equations, describing conversion electromechanical energy. 3-phase motors equation 2-4.) expanded follows:
2-6.)
2-7.)
2-8.)
where index individual phases. stated above equations, mutual effect between individual phases considered.
DRM031 Rev. MOTOROLA Target Motor Theory More Information This Product, www.freescale.com
Designer Reference Manual
Target Motor Theory Digital Control Motor
motor driven voltage strokes coupled with given rotor position. profile phase current together with magnetization characteristics define generated torque thus speed motor. this fact, motor requires electronic control operation. Several power stage topologies being implemented, according number motor phases desired control algorithm. particular structure power stage structure defines freedom control individual phase.
power stage with independent power switches motor phase most used topology. Such power stage 3-phase motors illustrated Figure 2-5. permits control individual phases fully independent each other thus allows widest freedom control. Other power stage topologies share some power devices several phases, thus saving power stage cost, with these, phases cannot controlled fully independently. Note, that this particular topology power stage fault tolerant, contrast power stages induction motors, because eliminates possibility rail-to-rail short circuit. During normal operation, electromagnetic flux motor constant must built every stroke. motoring period, these strokes correspond rotor position when rotor poles approaching corresponding stator pole excited phase. case Phase shown Figure 2-1, stroke established activating switches low-speed operation Pulse Width Modulation (PWM), applied corresponding switches, modulates voltage level. basic switching techniques applied: Soft switching where transistor turned during whole commutation period applied other Hard switching where applied both transistors simultaneously
Designer Reference Manual Target Motor Theory More Information This Product, www.freescale.com
DRM031 Rev. MOTOROLA
Target Motor Theory Digital Control Motor
Voltage
PWM_Q1
PWM_Q3
PWM_Q5
Phase
Phase
Phase
PWM_Q2
PWM_Q4
PWM_Q6
Figure 2-5. 3-Phase Power Stage Figure illustrates both soft hard switching techniques. control signals upper lower switches above-described power stage define phase voltage thus phase current. soft switching technique generates lower current ripple compared hard switching technique. Also, produces lower acoustic noise less EMI. Therefore, soft switching techniques often preferred motoring operation.
DRM031 Rev. MOTOROLA Target Motor Theory More Information This Product, www.freescale.com
Designer Reference Manual
Target Motor Theory
Unaligned Stator Poles Rotor Poles
Aligned
Unaligned
Aligned
Inductance
Upper Switch
Lower Switch
+VDC Phase Voltage
+VDC
-VDC
-VDC
Phase Current
Turn Turn
Position
Turn
Turn
Position
Soft Switching
Hard Switching
Figure 2-6. Soft Switching Hard Switching
Voltage Current Control Motors
number control techniques motors exist. They differ structure control algorithm position evaluation. basic techniques controlling motors distinguished, according motor variables that being controlled: Voltage control where phase voltage controlled variable Current control where phase current controlled variable
Designer Reference Manual Target Motor Theory More Information This Product, www.freescale.com
DRM031 Rev. MOTOROLA
Target Motor Theory Voltage Current Control Motors
2.5.1 Voltage Control Motor voltage control techniques, voltage applied motor phases constant during complete sampling period speed control loop. commutation phases linked position rotor. voltage applied phase directly controlled speed controller. speed controller processes speed error, difference between desired speed actual speed, generates desired phase voltage. phase voltage defined duty cycle implemented DC-Bus voltage inverter. phase voltage constant during complete dwell angle. technique illustrated Figure 2-7. current voltage profiles seen Figure 2-8. phase current peak position when inductance starts increase (stator rotor poles start overlap) change inductance profile.
Power Stage
Controller desired error
Output Duty Cycle
Speed Controller
Generator
actual
Figure 2-7. Voltage Control Technique
DRM031 Rev. MOTOROLA Target Motor Theory More Information This Product, www.freescale.com
Designer Reference Manual
Target Motor Theory
phase current decays through back diodes
position time
UDC-Bus*PWM
position time Speed Controller Output
-UDC-Bus
Figure 2-8. Voltage Control Technique Voltage Current Profiles
2.5.2 Current Control Motor current control techniques, voltage applied motor phases modulated reach desired current powered phase. most applications, desired current constant during complete sampling period speed control loop. commutation phases linked position rotor. voltage applied phase controlled current controller with external speed control loop. speed controller processes speed error, difference between desired speed actual speed, generates desired phase current. current controller evaluates difference between actual desired phase current calculates appropriate duty cycle. phase voltage defined duty cycle implemented DC-Bus voltage
Designer Reference Manual Target Motor Theory More Information This Product, www.freescale.com
DRM031 Rev. MOTOROLA
Target Motor Theory Voltage Current Control Motors
inverter. Thus, phase voltage modulated rate current control loop. This technique illustrated Figure 2-9. processing current controller needs linked commutation phases. When phase turned (commutated), duty cycle 100% applied phase. increasing actual phase current regularly compared desired current. soon actual current slightly exceeds desired current, current controller turned Current controller controls output duty cycle until phase turned (following commutation). procedure repeated each commutation cycle motor. current voltage profiles seen Figure 2-10. ideal cases, phase current controlled follow desired current.
Power Stage
Controller error desired
Speed Controller
idesired
ierror
Output Duty Cycle Current Controller Generator
actual
iactual
Figure 2-9. Current Control Technique
DRM031 Rev. MOTOROLA Target Motor Theory More Information This Product, www.freescale.com
Designer Reference Manual
Target Motor Theory
idesired
phase current decays through back diodes
position time
UDC-Bus
position time Current Controller Output 100%
-UDC-Bus
Figure 2-10. Current Control Technique Voltage Current Profiles
Designer Reference Manual Target Motor Theory More Information This Product, www.freescale.com
DRM031 Rev. MOTOROLA
Designer Reference Manual 3-Ph. Motor Control with Encoder
Section Switched Reluctance Motor Control Techniques with Encoder Position Sensor
Contents
Encoder Sensor Commutation Angle Calculation Commutation Strategy Current Controller
Encoder Sensor
Whenever mechanical rotary motions have monitored, encoder most important interface between mechanics control unit. Encoders transform rotary linear movement into sequence electrical pulses. rotary encoder differentiate number discrete positions revolution. number segments determines resolution movement hence accuracy position this number called points-per-revolution. speed encoder counts-per-second. Although there various kinds digital encoders, most common optical encoder. Rotary linear optical encoders used frequently motion position sensing. disc plate containing opaque transparent segments passes between light source (such LED) detector interrupt light beam. electronic signals that generated then into controller where position velocity information calculated based upon signals received. Many incremental encoders also have feature called index pulse. rotary encoders, index pulse occurs once encoder revolution. used establish absolute mechanical reference position within encoder count 360° encoder rotation. index signal used several tasks system. used reset preset
DRM031 Rev. MOTOROLA Designer Reference Manual
Switched Reluctance Motor Control Techniques with Encoder Position Sensor More Information This Product, www.freescale.com
Switched Reluctance Motor Control Techniques
position counter and/or generate interrupt signal system controller.
Phase
Phase
time
Figure 3-1. Quadrature Encoder Signals Quadrature encoders particular kind incremental encoder with least output signals, generally called Phase Phase seen Figure 3-1, channel offset degrees from channel addition second channel provides direction information feedback signal. This signal, leading lagging electrical degrees, guarantees exact determination direction rotation times. ability detect direction critical encoder rotation stops pulse edge. Without ability decode direction, counter count each transition through rising edge signal lose position. Another benefit quadrature signal scheme ability electronically multiply counts during encoder cycle. times-1 mode, counts generated rising edges channel times-2 mode, both rising falling edges channel used generate counts. times-4 mode, rising falling edges channel channel used generate counts. This increases resolution factor four. encoders with sine wave output, channels interpolated very high resolution.
Designer Reference Manual
DRM031 Rev. MOTOROLA
Switched Reluctance Motor Control Techniques with Encoder Position Sensor More Information This Product, www.freescale.com
Switched Reluctance Motor Control Techniques with Encoder Position Sensor Commutation Angle Calculation
Commutation Angle Calculation
motor, switched-on switched-off angles complex functions many parameters variable optimum operation. Their fine tuning necessary maintain optimum performance different motor speed load conditions. control firing angle accomplished number ways strongly depends position sensor. position information precisely acquired, possible suitably utilize sophisticated algorithm.
This control technique varies firing angle continuously with fixed dwell angle. switched-on angle calculated such that excitation current should reach maximum defined value beginning stator rotor tooth overlap. phase current built corresponding windings stator since inductance minimum level unaligned position there adequate time increase desired value before motoring torque being produced. conduction angle remains fixed through entire application ensure phase current decreased before reaching braking region (following aligned position). calculation neglects stator winding resistance, which simplifies equation. resistance neglect recognized only large values resistance which case very small switched reluctance machines. Figure explains proposed algorithm advance angle calculation. computation method derived from 2-6.) 2-8.) rearranged into following expression
3-1.)
where:
voltage applied phase phase resistance phase current phase inductance rotor position
DRM031 Rev. MOTOROLA
Designer Reference Manual
Switched Reluctance Motor Control Techniques with Encoder Position Sensor More Information This Product, www.freescale.com
Switched Reluctance Motor Control Techniques
idesired iphase Lunaligned
uapplied
position time
100%
Figure 3-2. Commutation Angle Calculation unaligned phase inductance considered constant near turn-on instant. voltage drop across phase resistance neglected, then following expression given 3-2.) using first order approximation:
desired unaligned actual
3-2.)
where:
advance angle
idesired desired current achieved Lunaligned unaligned inductance uphase applied phase voltage actual actual rotor speed
Designer Reference Manual
DRM031 Rev. MOTOROLA
Switched Reluctance Motor Control Techniques with Encoder Position Sensor More Information This Product, www.freescale.com
Switched Reluctance Motor Control Techniques with Encoder Position Sensor Commutation Strategy
Commutation Strategy
general, commutation strategy determines performance motor. commutation method uses rotor position feedback derive commutating signals inverter switches. controlled parameters applied phase voltage turn-on angle dwell angle fixed prior motor starts. number commutations mechanical revolution proportional number rotor poles number stator phases 3-3.). arises from mechanical construction motor. number motor commutations calculated follows:
NumOfCommut
3-3.)
where:
NumOfCommut number commutations mechanical revolution number rotor poles number stator phases
motor usually described terms low-speed high-speed regions. low-speed operating region graphically depicted Figure 3-3. this low-speed operating area, phase current arbitrarily controlled desired value. Increasing rotor speed makes difficult control phase current. There influence back-EMF effect combined with diminishing amount time perform commutation.
DRM031 Rev. MOTOROLA
Designer Reference Manual
Switched Reluctance Motor Control Techniques with Encoder Position Sensor More Information This Product, www.freescale.com
Switched Reluctance Motor Control Techniques
Current Actual Inductance Estimated Inductance
idesired
advance
UDC-Bus
edge
360°
uapplied
Position Time
idesired reached
100%
Current Controller Output
-UDC-Bus
Figure 3-3. Commutation Strategy commutation itself performed number ways. presented control technique utilizes encoder sensor information initiate commutation routine, which ensures turn-off previous stator phase, consecutively next stator phase turned depending direction rotor rotation. appropriate firing angle, calculated through advance angle calculation (see Section 3.3). commutation software algorithm determines necessary advance angle, advance, turning correct stator phase. advance instant, full DC-Bus voltage applied after switching correct phase. actual value phase current exceeds desired current value then current controller with sufficient controller initialization started maintain actual value phase current within requested magnitude. This achieved chopping DC-Bus voltage.
Designer Reference Manual
DRM031 Rev. MOTOROLA
Switched Reluctance Motor Control Techniques with Encoder Position Sensor More Information This Product, www.freescale.com
Switched Reluctance Motor Control Techniques with Encoder Position Sensor Current Controller
simplest scheme leave lower transistor during current regulation switch upper high fixed frequency with varying duty cycle. This strategy often called soft switching (see Figure 2-6). current waveform during soft switching similar that shown Figure 3-3.
Current Controller
Basically, there three different modes operation, namely, voltage control, current control, single-pulse control. current control method normally used control torque efficiently, while single-pulse mode entered high-speed operation. Major difficulty, when designing switched reluctance motor current controllers, that winding back electromotive force (back-EMF) electrical time constant vary significantly within electrical cycle with motor speed phase current level. voltage equation given 2-4.). This equation indicates non-linear model, which dependent position, current speed. electrical time constant phase winding back-EMF vary greatly with current rotor position. Figure implies, current controller switched when desired stator phase current reached. this point, slope increasing inductance (inductance derivation over position) considered constant value, phase current preserved defined target value; then 2-4.) rearranged follows:
phase_applied
3-4.)
applied phase voltage roughly maintained near value 3-4.), where desired phase current, actual angular speed rotor. Derivation over position corresponding phase inductance determined from motor parameter measurements. Knowing these parameters, initial current controller using 3-4.) time instance (see point Figure 3-4) when controller switched
DRM031 Rev. MOTOROLA
Designer Reference Manual
Switched Reluctance Motor Control Techniques with Encoder Position Sensor More Information This Product, www.freescale.com
Switched Reluctance Motor Control Techniques
idesired reached
UDC-Bus
uapplied
uapplied
Position Time
100%
Current Controller Output
-UDC-Bus
Figure 3-4. Phase Voltage Generation
Designer Reference Manual
DRM031 Rev. MOTOROLA
Switched Reluctance Motor Control Techniques with Encoder Position Sensor More Information This Product, www.freescale.com
Designer Reference Manual 3-Ph. Motor Control with Encoder
Section System Description
Contents
System Outline Application Description
System Outline
This system designed drive 3-phase motor. application meets following performance specifications: Speed control motor with Encoder position sensor with inner current closed loop Targeted DSP56F803EVM, DSP56F805EVM, DSP56F807EVM Running 3-phase motor control development platform variable line voltage between 115V 230V (voltage range -15% +10%) control technique incorporates current control with speed closed loop motor starts from motor position with rotor alignment direction rotation motoring mode minimal speed maximal speed 2600 input power line 230V maximal speed 1600 input power line 115V Encoder position reference commutation
DRM031 Rev. MOTOROLA System Description More Information This Product, www.freescale.com
Designer Reference Manual
System Description
Manual interface (Start/Stop switch, Up/Down push button control, indicator) master software control interface (motor Start/Stop, speed setup) Power stage identification DC-Bus over-voltage, DC-Bus under-voltage, DC-Bus over-current over-heating fault protection master software monitor graphical control page (required speed, actual motor speed, operational mode PC/manual, start/stop status, drive fault status, DC-Bus voltage level, identified power stage boards, system status) speed scope (observes actual desired speeds) current controller (observes actual desired phase current, applied phase voltage)
Application Description
drive, standard system concept chosen (see Figure 4-1). system incorporates following hardware parts: 3-phase high-voltage development platform (power stage with optoisolation board, motor brake) Feedback sensors: DC-Bus voltage, phase current, phase current, phase current, temperature DSP56F80x controller board
Designer Reference Manual System Description More Information This Product, www.freescale.com
DRM031 Rev. MOTOROLA
System Description Application Description
3-Phase Power Stage
Line
Voltage Current Temperature
LOAD
DSP56F80x Fault Protection
START STOP DOWN
Speed Cmd.
Speed Error
Speed Controller
Current Cmd.
Current Error
Current Controller
Desired Duty Volatge DC-Bus Cycle Ripple Elimination
Generation
Remote Control
Voltage
Commutation Commutation Angle Calculation
Phase Current Speed Feedback
Speed Feedback
Speed Calculation
Position Feedback
Quad
Figure 4-1. System Concept runs main control algorithm. generates 3-phase output signals motor power stage according user interface input feedback signals. drive controlled different ways operational modes): Manual operational mode, required speed Start/Stop switch Down push buttons. master software operational mode, required speed master software
After RESET, drive initialized automatically enters MANUAL operational mode. Note, that master software only take over
DRM031 Rev. MOTOROLA System Description More Information This Product, www.freescale.com Designer Reference Manual
System Description
control when motor stopped. When Start command detected (using Start/Stop switch master software "Start" button) while fault pending, start-up sequence with rotor alignment performed motor started. Rotor position evaluated using encoder position sensor. commutation angle calculated according desired speed, desired current actual DC-Bus voltage. When actual position rotor equal reference position, commutation phases desired direction rotation done; actual phase turned following phase turned actual motor speed derived from position information, additional velocity sensor unneeded. reference speed calculated according control signals (Start/Stop switch, Up/Down push buttons) master software commands (when controlled master software). acceleration/deceleration ramp implemented. comparison between reference speed measured speed gives speed error. Based speed error, speed controller generates desired phase current. When phase commutated, turned with duty cycle 100%. Then, during each cycle, actual phase current compared with desired current. soon actual current exceeds desired current, current controller turned current controller controls output duty cycle until phase turned (following commutation). Finally, 3-phase control signals generated. procedure repeated each commutation cycle motor. DC-Bus voltage, DC-Bus current, power stage temperature measured during control process. measurements used DC-Bus over-voltage, DC-Bus under-voltage, DC-Bus over-current over-temperature protection drive. DC-Bus under-voltage over-temperature protection performed software, while DC-Bus over-current DC-Bus over-voltage fault signals utilize fault inputs on-chip module. line voltage measured during initialization application. According detected level, 115VAC 230VAC mains recognized. line voltage detected outside -15% +10% range nominal voltage, fault "Out Mains Limit" disables drive operation.
Designer Reference Manual System Description More Information This Product, www.freescale.com DRM031 Rev. MOTOROLA
System Description Application Description
above mentioned faults occur, motor control outputs disabled order protect drive. fault status only exited when fault conditions have disappeared Start/Stop switch toggld through STOP position. fault state indicated on-board LED. power stage uses unique configuration power devices, different than BLDC configuration. software would cause destruction BLDC power stages simultaneous switching power devices. Since application software could accidentally loaded into BLDC drive, software incorporates protection feature prevent this could happen. Each power stage contains simple module which generates logic signal sequence that unique that type power stage. During initialization chip, this sequence read evaluated according decoding table. correct power stage identified, fault, "Wrong Power Stage", disables drive operation.
4.3.1 Initialization Start-Up Before motor started, rotor alignment initialization control algorithms must performed (see Figure 4-2) since absolute position known.
DRM031 Rev. MOTOROLA System Description More Information This Product, www.freescale.com
Designer Reference Manual
System Description
Start Command Accepted
Turn Phases
Rotor Position
Wait Ensure Initial Pulse
Turn Phase
Wait 550msec
Rotor Stabilized
Measure Phase Resistance Average Measurements
Phase Aligned
Commutate Phases (Turn Phase Turn Phase
Motor Starts
Figure 4-2. Start-Up Sequence First, rotor needs aligned known position able start motor desired direction rotation. This done following steps: phases turned simultaneously (phases After 50msec, phase turned (phase other phase stays powered (phase After additional msec, rotor stabilized enough
Designer Reference Manual System Description More Information This Product, www.freescale.com DRM031 Rev. MOTOROLA
System Description Application Description
aligned position with respect powered phase (phase Step provides initial impulse rotor. phase exactly unaligned position thus does generate torque, phase provides initial movement. Then, phase disconnected phase stays powered (Step stabilization pulse phase must long enough stabilize rotor aligned position with respect that phase. total, stabilization takes sec. After this time, rotor stable enough reliably start motor desired direction rotation.
4.3.2 Position Speed Sensing position information used generate accurate switching instants power converter, ensuring drive stability fast dynamic response. Velocity feedback derived from position information, that additional velocity sensor unneeded. members Motorola DSP56F80x family, except 56F801, have on-chip quadrature decoder module connected quadrature timer. This peripheral commonly used position speed sensing. quadrature decoder position counter counts up/down each edge phase phase signals according their order (see Figure 4-3). phase phase inputs controller routed through switch matrix general purpose timer module quadrature decoder module well (see Figure 4-4). timer module four available inputs normal timer input capture channels. This does preclude quadrature decoder module. Both timer decoder take advantage digital filter incorporated quadrature decoder module.
Figure 4-3. Quadrature Encoded Signals
DRM031 Rev. MOTOROLA System Description More Information This Product, www.freescale.com Designer Reference Manual
System Description
presented application uses quad decoder module approach speed measurement using 16-bit position difference counter. counter acts differentiator, whose count value proportional change position, since last time position counter read. speed computed calculating change position counter unit time, reading position difference counter register (POSD) calculating speed. second method employed this application rotor speed measurement also feedback signal speed controller. position difference register (POSD) regularly scanned pre-defined time period consecutively this value used compute actual rotor speed. addition, quadrature decoder module shares pins with quadrature timer module shared pins configured timer outputs, then pins available inputs quad decoder modules. quad timer module contains four identical counter/timer groups. wide variability quad timer modules, possible this module decode quadrature encoder signals sense position speed well. presented application uses configuration arranged position sensing commutation instance determination. quad timer quad timer decode primary secondary external inputs quad-encoded signals generated rotary sensor monitor movement motor shaft. Quad signal decoding provides both count direction information. timer programmed count programmed value that corresponds electric revolution then immediately re-initialize after terminal count value reached. This timer assigned master broadcast compares signals quad timer, timer configured re-initialized predetermined value when master timer's compare event occurs. This counter continues repeatedly counting past compare value. When count matches compare value, interrupt enabled compare register value used commutation instances generation.
Designer Reference Manual
DRM031 Rev. System Description More Information This Product, www.freescale.com MOTOROLA
System Description Application Description
used Decoder module
EDGE DETECT STATE MACHINE GLITCH FILTER DELAY WATCHDOG TIMER
Phase Phase Index Home
POSITION DIFFERENCE COUNTER
POSITION COUNTER
COUNTER
Timer Input Capture Channels
SWITCH MATRIX
Timer Timer
Timer
Timer Timer module
Figure 4-4. Decoder Timer Arrangement
4.3.3 Commutation Algorithm motor commutation strategy uses rotor position feedback drive commutating signals inverter switches. core control algorithm includes calculation commutation angle, phases commutation. calculation commutation angle performed according 3-2.). calculated regularly during motor operation. commutation algorithm described Figure 4-5. After finish start-up routine, which includes alignment procedure initialization necessary commutation variables, rotor sufficiently stabilized ready mode. This point from which commutation routine start. first procedure commutation routine turn corresponding phase. Choosing correct phase switch depends defined rotation rotor. turn angle unaligned position, current rises linearly until poles begin overlap. regular switched reluctance motor, angle rising inductance half pole-pitch. pole-pitch angle rotation between
DRM031 Rev. MOTOROLA System Description More Information This Product, www.freescale.com
Designer Reference Manual
System Description
successive aligned positions. Ideally, flux should zero throughout period falling inductance, because current flowing that period produces negative braking) torque. avoid this, dwell angle dwell restricted. practice, dwell angle electrical degrees usually used, because gain torque-impulse during increasing inductance exceeds small braking torque impulse. This condition occurs when current tail extending beyond aligned position. torque negative during this tail period, small. turn-off angle instant determined.
Designer Reference Manual System Description More Information This Product, www.freescale.com
DRM031 Rev. MOTOROLA
System Description Application Description
START
Turn PHASE
dwell
on=f(,
actual
Turn PHASE
actual
Figure 4-5. Commutation Algorithm Flowchart next step proposed commutation algorithm calculate advance turn-on angle. entire calculation explanation presented Commutation Angle Calculation. firing angle next commutation instant. presented commutation algorithm does allow parallel current conduction phases same
DRM031 Rev. MOTOROLA System Description More Information This Product, www.freescale.com Designer Reference Manual
System Description
time. angle comparison turn-on turn-off assures that current phase turned before following phase turned case 120-electrical-degree dwell angle, switching switching performed simultaneously. conduction (dwell) angle restricted, turning overtakes turning clear Figure 4-5. comparison actual block waits appropriate position commutate corresponding stator phase, next comparison actual block algorithm remains same until proper position occurs switch following stator phase. algorithm loop closed ready other commutation occurrences.
4.3.4 Current Controller Implementation current controller utilization flowchart reveals algorithm process controller switching. appropriate stator phase turned DC-Bus voltage applied corresponding rotor phase. phase current rises almost linearly until predefined target value attained. this point, processing proposed algorithm, current controller switched maintains actual current flowing within desired value. Before current controller switched necessary initialization required. mainly concerned with integral portion step current controller. This part controller structure preset according equation 3-4.). following commutation instance turns controller flag corresponding rotor phase fully voltage loaded until reaching desired value phase current. Figure clarifies entire controller usage algorithm.
Designer Reference Manual System Description More Information This Product, www.freescale.com
DRM031 Rev. MOTOROLA
System Description Application Description
START
Commutate
Controller
Controller
iphase>idesired
Controller Controller INIT
uapplied =U_dc_bus
uapplied controller
Figure 4-6. Current Controller Utilization
4.3.5 Current Voltage Measurement Precise measurement phase current DC-Bus voltage factor current control implementation. 4.3.5.1 Current Sensing Current measurement needs investigated according used current sensors influence noise measurement.
DRM031 Rev. MOTOROLA System Description More Information This Product, www.freescale.com
Designer Reference Manual
System Description
quality current measurement depends heavily type current sensors used. most useful Hall effect sensors. Unfortunately, these sensors expensive thus suitable most cost-sensitive applications. Therefore, current shunt resistors inserted into current path phase often implemented (see Figure 4-7). phase current sensed voltage drop across sense resistor.
Voltage PWM_T1 Phase
PWM_T2
sense
V_ref 1.65V
Figure 4-7. Shunt Resistors Current Sensors When power switches' soft switching used (the lower switch left during complete commutation period, while upper switch modulated PWM), current visible shunt resistor time. soft switching phase current, measured shunt resistor, shown Figure 4-8. phase current visible only when both switches turned (the phase current flows through switches sensing resistor) when both switches turned (the phase current flows through freewheeling diodes sensing resistor). When both switches phase turned measured current negative, needs inverted. diagram shows that
Designer Reference Manual System Description More Information This Product, www.freescale.com
R_sense
sense
DRM031 Rev. MOTOROLA
System Description Application Description
reliable current shape reconstruction, sensing needs synchronized with frequency center pulse both positive negative voltage drop polarities should measured. zero current half range, both positive negative voltage drops phase current shunt resistors measured. voltage drop then amplified according range. Proceeding like this, current read with accuracy credibility.
Figure illustrates actual phase currents 3-phase motor, measured shunt resistors described above. previously specified current sensing method described from processor point view. seems measured phase current negative, which caused inverting differential amplifier. Actually, measured phase current flowing through shunt resistor sensed consecutively inverted differential amplifier.
DRM031 Rev. MOTOROLA System Description More Information This Product, www.freescale.com
Designer Reference Manual
System Description
Switch (T1) Time Bottom Switch (T2) Time
Actual Phase Current
Time
Sensed Voltage Drop
Time
Synchronization
Figure 4-8. Soft Switching Current Sensed
Designer Reference Manual System Description More Information This Product, www.freescale.com
DRM031 Rev. MOTOROLA
System Description Application Description
Current Sensing
Phase Current
Phase Phase Phase
0.01 0.02 0.03 0.04 0.05
-0.2 -0.4 -0.6 -0.8
Time [sec]
Figure 4-9. Phase Current Measured Current Shunt Resistors low-cost shunt resistor sensors create serious issue. low-voltage drop sensed across shunt current resistors, measured signals susceptible noise. technique noise elimination been developed successfully implemented. technique based assumption that same noise induced simultaneously measured signals. method supposes measurement signals simultaneously, known signal reference) signal measured. Then reference signal consists known signal noise, while measured signal consists actual signal same noise. MeasuredSignal ActualSignal Noise ReferenceSignal KnownSignal Noise 4-1.) 4-2.)
noise same, eliminated subtraction reference signal from measured signal. described above, necessary condition simultaneous sampling both signals, ensuring that noise both signals identical. ActualSignal MeasuredSignal ReferenceSignal +KnownSignal(EQ 4-3.)
DRM031 Rev. MOTOROLA System Description More Information This Product, www.freescale.com
Designer Reference Manual
System Description
This technique been implemented phase current sensing. motor controlled which phases commutated sequentially, which means that when working phase turned off, following phase, direction rotation, turned Thus phase motor never powered during complete commutation interval. This phase considered reference. Because reference phase powered, reference phase current should equal zero. measured value reference current then considered noise given commutation interval. actual phase current equal difference between measured current reference current: Isensed Ireference 4-4.)
reference signal needs commutated together with commutation phases. Table defines active, discharge reference phases commutation sequence derived from Figure 4-9.
Table 4-1. Commutation Sequence Reference Phase
Step Active Phase Discharge Phase Reference Phase
efficiency current sensing noise reduction technique illustrated Figure 4-10. figures illustrate phase current measured (active phase current inverted compared Figure 4-9), same current with implemented noise reduction technique. seen, implemented technique improves current sensing significantly. eliminates only noise current sensors, also noise induced sensing cables noise reference power supply.
Designer Reference Manual System Description More Information This Product, www.freescale.com
DRM031 Rev. MOTOROLA
System Description Application Description
4.3.5.2 Voltage Sensing DC-Bus voltage sensor represented simple voltage divider. DC-Bus voltage does change rapidly. nearly constant with ripple given power supply structure. bridge rectifier rectification line voltage used, ripple frequency times line frequency. ripple amplitude should exceed nominal DC-Bus value, power stage designed correctly. measured DC-Bus voltage needs filtered order eliminate noise. most useful techniques moving average filter, that calculates average value from last samples:
DCBus
DCBus
4-5.)
order increase precision voltage sensing, voltage drop power switches diodes power stage incorporated into determination actual voltage present motor phase.
DRM031 Rev. MOTOROLA System Description More Information This Product, www.freescale.com
Designer Reference Manual
System Description
-0.1
active corrected discharge corrected
current
0.01
0.02 time [sec]
0.03
0.04
0.05
-0.1
active discharge
current
0.01
0.02 time [sec]
0.03
0.04
0.05
Figure 4-10. Measured 3-Phase Currents without with Implemented Noise Correction
Designer Reference Manual System Description More Information This Product, www.freescale.com
DRM031 Rev. MOTOROLA
System Description Application Description
4.3.6 Power Module Temperature Sensing measured power module temperature used thermal protection. hardware realization shown Figure 4-11. circuit consists four diodes connected series, bias resistor, noise suppression capacitor. four diodes have combined temperature coefficient mV/C. resulting signal, Temp_sense, back input where software used safe operating limits. presented application, temperature degrees Celsius calculated according conversion equation:
Temp_sense temp
4-6.)
where:
temp power module temperature degrees Celsius diode-dependent conversion constant -0.0073738) diode-dependent conversion constant 2.4596)
Temp_sense voltage drop diodes which measured
+3.3V_A
2.2k BAV99LT1 BAV99LT1 100nF
Figure 4-11. Temperature Sensing Topology
DRM031 Rev. MOTOROLA System Description More Information This Product, www.freescale.com
Designer Reference Manual
System Description
Designer Reference Manual System Description More Information This Product, www.freescale.com
DRM031 Rev. MOTOROLA
Designer Reference Manual 3-Ph. Motor Control with Encoder
Section Hardware Design
Contents
System Configuration DSP56F805EVM Controller Board 3-Phase High-Voltage Power Stage Optoisolation Board Motor-Brake Specifications. Hardware Documentation
System Configuration
application designed drive 3-phase motor. application controlled Motorola DSP56F805 motor control DSP. consists following modules (see Figure 5-1): DSP56F805EVM Control Board 3-Ph. High Voltage Power Stage Optoisolation Board 3-phase Switched Reluctance Motor
DRM031 Rev. MOTOROLA Hardware Design More Information This Product, www.freescale.com
Designer Reference Manual
Hardware Design
Figure 5-1. 3-Phase High Voltage Platform Configuration
Designer Reference Manual Hardware Design More Information This Product, www.freescale.com
DRM031 Rev. MOTOROLA
Hardware Design DSP56F805EVM Controller Board
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 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
DRM031 Rev. MOTOROLA Hardware Design More Information This Product, www.freescale.com
Designer Reference Manual
Hardware Design
DSP56F805's features optimize performance their product, shown Figure 5-2.
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 5-2. Block Diagram DSP56F805EVM
3-Phase High-Voltage Power Stage
Motorola's embedded motion control series high-voltage (HV) switched reluctance (SR) power stage watt (1/4 horsepower), 3-phase power stage that will operate input voltages from volts volts line voltages from volts volts. combination with Motorola's Embedded Motion Control Series control boards optoisolation board, provides software development platform that allows algorithms written tested,
Designer Reference Manual Hardware Design More Information This Product, www.freescale.com DRM031 Rev. MOTOROLA
Hardware Design 3-Phase High-Voltage Power Stage
without need design build power stage. supports wide variety algorithms controlling switched reluctance motors. Input connections made 40-pin ribbon cable connector J14. Power connections motor made output connector J13. Phase phase phase labeled board. Power requirements with single external 140-volt 230-vo power supply line voltage. Either input supplied through connector J11. Current measuring circuitry 2.93 amps full scale. Both phase currents measured. cycle-by-cycle overcurrent trip point 2.69 amps. power stage both printed circuit board power substrate. printed circuit board contains IGBT gate drive circuits, analog signal conditioning, low-voltage power supplies, power factor control circuitry, some large passive power components. This board also MC68HC705JJ7 microcontroller used board configuration identification. power electronics that need dissipate heat mounted power substrate. This substrate includes power IGBTs, brake resistors, current-sensing resistors, power factor correction MOSFET, temperature sensing diodes. Table shows block diagram.
DRM031 Rev. MOTOROLA
Designer Reference Manual Hardware Design More Information This Product, www.freescale.com
Hardware Design
POWER INPUT
SWITCH MODE POWER SUPPLY
CONTROL BRAKE
SIGNALS TO/FROM CONTROL BOARD
3-PHASE IGBT POWER MODULE GATE DRIVERS PHASE CURRENT PHASE VOLTAGE CURRENT VOLTAGE MONITOR BOARD BLOCK 3-PHASE MOTOR
Figure 5-3. 3-ph. Power Stage electrical characteristics Table apply operation 25°C with 160-Vdc supply voltage.
Designer Reference Manual Hardware Design More Information This Product, www.freescale.com
DRM031 Rev. MOTOROLA
Hardware Design Optoisolation Board
Table 5-1. Electrical Characteristics Power Stage
Characteristic input voltage input voltage Quiescent current logic input voltage logic input voltage Symbol VOut ISense VBus PBK(Pk) Pdiss 8.09 mV/A mV/V Units
Input resistance Analog output range current sense voltage voltage sense voltage Peak output current Brake resistor dissipation (continuous) Brake resistor dissipation Total power dissipation
Optoisolation Board
Motorola's embedded motion control series optoisolation board links signals from controller high-voltage power stage. board isolates controller, peripherals that attached controller, from dangerous voltages that present power stage. optoisolation board's galvanic isolation barrier also isolates control signals from high noise power stage provides noise-robust systems architecture. Signal translation virtually one-for-one. Gate drive signals passed from controller power stage high-speed, high dv/dt, digital optocouplers. Analog feedback signals passed back through HCNR201 high-linearity analog optocouplers. Delay times typically
DRM031 Rev. MOTOROLA Hardware Design More Information This Product, www.freescale.com
Designer Reference Manual
Hardware Design
digital signals, analog signals. Grounds separated optocouplers' galvanic isolation barrier. Both input output connections made 40-pin ribbon cable connectors. assignments both connectors same. example, signal PWM_AT appears input connector also output connector. addition usual motor control signals, MC68HC705JJ7CDW serves serial link, which allows controller software identify power board.
Power requirements controller side circuitry with single external 12-Vdc power supply. Power power stage side circuitry supplied from power stage through 40-pin output connector. electrical characteristics Table apply operation 25°C, 12-Vdc power supply voltage. Table 5-2. Electrical Characteristics Optoisolation Board
Characteristic Power Supply Voltage Quiescent Current Logic Input Voltage Logic Input Voltage Analog Input Range Input Resistance Analog Output Range Digital Delay Time Analog Delay Time Symbol VOut tDDLY tADLY 70(1) 200(2) 0.25 500(3) Units DC/DC converter logic logic Notes
Power supply powers optoisolation board only. Current consumption optoisolation board plus board (powered from this power supply) Maximum current handled DC/DC converters
Motor-Brake Specifications
motor-brake incorporates 3-Ph. attached BLDC motor brake. detailed specifications listed Table
Designer Reference Manual Hardware Design More Information This Product, www.freescale.com DRM031 Rev. MOTOROLA
Hardware Design Motor-Brake Specifications
motor stator poles four rotor poles. This combination yields strokes pulses) single mechanical revolution. motor characterized dedicated inductance profile. motor inductance profile function mechanical position shown Figure 5-4. mechanical angle 90omech corresponds electrical period stroke. presented profile used determination advanced commutation angle. motor brake shaft, position encoder position Hall sensor attached. They allow position sensing required control algorithm. introduced drive uses Encoder position determination
Table 5-3. Motor Brake Specifications Manufacturer Brno, Czech Republic
eMotor Type: Stator Rotor Poles: Motor Specification: Speed Range: Nominal Voltage: Nominal Current: Brake Type Brake Specification: Nominal Voltage: Nominal Current: Type Position Encoder Pulses Revolution SR40V (3-phase Motor) 5000 300V 1.2A SG40N 3-phase BLDC Motor Baumer Electric 16.05A 1024-12-5 1024
DRM031 Rev. MOTOROLA Hardware Design More Information This Product, www.freescale.com
Designer Reference Manual
Hardware Design
Inductance mechanical angle [deg] Phase Phase Phase
Figure 5-4. Inductance Characteristic
Hardware Documentation
system parts supplied documented according following references: Controller Board DSP56F805: supplied DSP56805EVM described DSP56F805EVMUM/D Evaluation Module Hardware User's Manual 3-phase High-Voltage Power Stage supplied with Optoisolation Board ECOPTHIVSR described MEMC3PSRHVPSUM/D Motorola Embedded Motion Control 3-phase High-Voltage Power Stage User's Manual
Designer Reference Manual Hardware Design More Information This Product, www.freescale.com
Optoisolation Board
DRM031 Rev. MOTOROLA
Hardware Design Hardware Documentation
supplied with 3-ph. High Voltage Power Stage ECOPTHIVSR supplied alone ECOPT optoisolation board described Motorola Embedded Motion Optoisolation Board User's Manual MEMCOBUM/D Motor-Brake AM40V SG40N 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.
DRM031 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
DRM031 Rev. MOTOROLA
Designer Reference Manual 3-Ph. Motor Control with Encoder
Section Software Design
Contents
Data Flow State Diagram. Software Design Scaling Quantities. Velocity Calculation
Data Flow
control algorithm closed loop drive described Figure Figure 6-2. based system description. individual processes described detail following sections.
DRM031 Rev. MOTOROLA Software Design More Information This Product, www.freescale.com
Designer Reference Manual
Software Design
SPEED SETTING
MASTER
POSITION SENSOR
omega_required_mech
omega_reqPCM_mech
position_difference
position_actual
Acceleration
Speed Calculation
next page
Ramp next page
omega_desired
omega_actual
u_dc_bus I_active
Speed Controller
I_active I_desired
Commutation Angle Calculation
Current Controller
theta theta
u_desired
DC-Bus Ripple Elimination
Commutation
outputDutyCycle
&srmCmtData
Generation
Outputs Pwm_AT Pwm_AB Pwm_BT Pwm_BB Pwm_CT Pwm_CB
Figure 6-1. System Data Flow Motor Control
Designer Reference Manual Software Design More Information This Product, www.freescale.com
DRM031 Rev. MOTOROLA
Software Design Data Flow
DC-Bus Volatge Converter
3-Phase CURRENTS Converter
Correction Current
u_dc_bus
i_active
next page
Figure 6-2. System Data Flow Converter
6.2.1 Acceleration Ramp This process calculates desired speed based required speed according acceleration deceleration ramp. required speed either manually, using push buttons (when manual operating mode), master software (when master software operating mode).
6.2.2 Speed Calculation process calculates actual speed motor. calculation based evaluation position information. on-chip quadrature decoder provides information position difference through 16-bit counter. When position register read, position difference counter's contents copied into position
DRM031 Rev. MOTOROLA Software Design More Information This Product, www.freescale.com
Designer Reference Manual
Software Design
difference hold register (POSDH) position difference counter cleared. register regularly read captured value used speed calculation. speed computed reading position difference counter register pre-defined time sample. software moving average filter applied speed measurement incorporated into process greater noise immunity. actual motor speed calculated average value last four measurements.
6.2.3 Speed Controller This process calculates desired phase current according speed error. Speed error difference between actual speed desired speed. Proportional-Integrational (PI) type controller implemented. constants speed controller tuned experimentally according load profile speed limits.
6.2.4 Current Controller This process calculates duty cycle based phase current error. Phase current error difference between actual phase current desired phase current. type controller implemented. current controller constants tuned experimentally according type used motor used.
6.2.5 DC-Bus Ripple Elimination This process provides elimination voltage ripple DC-Bus. compensates amplitude desired phase voltage generated current controller. output calculation duty cycle that applied corresponding stator phase.
Designer Reference Manual Software Design More Information This Product, www.freescale.com
DRM031 Rev. MOTOROLA
Software Design Data Flow
6.2.6 Generation This process sets on-chip module generation control pulses 3-Ph. power stage. Generation these pulses based software control register that formulated process Commutation Calculation based required duty cycle generated Speed Controller process. calculated software control word loaded into proper register duty cycle updated according required duty cycle. Generation process accessed regularly rate given frequency. frequent enough ensure precise generation commutation pulses.
6.2.7 Correction Current This process takes care Analog-to-Digital Converter. sampling synchronized pulses. process selects proper channels converted reads processes results conversion. active discharge phase currents selected corrected using measured reference noise signal. DC-Bus voltage temperature filtered using moving average filter. 4.3.5 Current Voltage Measurement detailed description.
6.2.8 Commutation Angle Calculation This process calls commutation angle calculation routine which calculates advanced angle according actual speed, DC-Bus voltage desired current (see Commutation Angle Calculation). algorithm 3-Phase Motor Commutation Angle Calculation srmcacAngleCalc generates required advance angle commutation according principle described Commutation Angle Calculation. Before calculation routine call, scaling constant must properly determined (see Scaling Quantities).
scaling constant
DRM031 Rev. MOTOROLA Software Design More Information This Product, www.freescale.com
Designer Reference Manual
Software Design
scale_const
following functions algorithm need called order calculate commutation angle:
adv_angle routine call u_ph voltage across phase winding i_ph phase current w_actual actual speed
These functions called Process Commutation. detailed description algorithm found algorithm documentation.
6.2.9 Commutation This process provides comutation motor phases. on-chip module used mode generation independent output signals that controlled either software module. commutation technique distinguishes three following cases: When output needs modulated, generator controls channel directly When output needs switched inactive state (0), software output control corresponding channel handed over channel turned manually When output needs switched active state (1), software output control corresponding channel handed over channel turned manually
on-chip module enables control outputs from module either generator, using software. Setting output control enable bit, OUTCTLx, enables software drive outputs instead generator. independent mode, with OUTCTLx output OUTx controls PWMx channel. Setting clearing OUTx activates deactivates PWMx output. OUTCTLx OUTx bits output control register.
Designer Reference Manual Software Design More Information This Product, www.freescale.com DRM031 Rev. MOTOROLA
Software Design State Diagram
This control technique requires preparation output control register. calculation OUTCTLx OUTx bits output control register, dedicated commutation algorithm, 3-Phase Motor Commutation Handler Configuration 2-Switches-per-Phase, srmcmt3ph2spp, developed. algorithm generates output control word according desired action desired direction rotation. example, when phase needs turned off, algorithm sets corresponding OUTCTLx bits enable output control required PWMs clears OUTx bits turn PWMs. other output control register bits affected.
State Diagram
processes described above implemented single state machine, illustrated Figure 6-3. state machine provides transition amongst application states INIT, STOP, RUN, FAULT. following variables used invoke transition between individual states: switchState (Stop, Run): state Start/Stop switch appFault (NO_FAULT, fault): fault occurrence appOpMode (change from Manual vice versa): change operational mode
DRM031 Rev. MOTOROLA Software Design More Information This Product, www.freescale.com
Designer Reference Manual
Software Design
RESET
INIT State
appFault NO_FAULT switchState Stop appFault NO_FAULT appOpMode change
switchState Stop
FAULT State
STOP State
appFault NO_FAULT
switchState appFault NO_FAULT
switchState Stop appFault NO_FAULT
appFault NO_FAULT
State
Figure 6-3. Application State Diagram
6.3.1 Application State INIT After RESET application enters INIT state. this state, drive disabled motor cannot started. fault detected, application transits FAULT state (protection against faults). fault present, Start/Stop switch detected STOP position, application transits STOP state (protection against starting after reset Start/Stop switch accidentally START position).
6.3.2 Application State STOP STOP state entered either from INIT state from state. STOP state, drive enabled application waits START command.
Designer Reference Manual Software Design More Information This Product, www.freescale.com DRM031 Rev. MOTOROLA
Software Design Software Design
When application STOP state, operating mode changed, either from MANUAL mode master software mode vice versa. When operating mode changed, application always transits INIT state. fault STOP state detected, application enters FAULT state (fault protection). fault present start command accepted, application transits state motor started.
6.3.3 Application State state entered from STOP state. state drive enabled motor running. fault state detected, application enters FAULT state (fault protection). fault present STOP command accepted application transits STOP state motor stopped.
6.3.4 Application State FAULT STOP state entered from state. FAULT state, drive disabled application waits faults cleared. When detected that fault been eliminated, fault clear command accepted (the Start/Stop switch moved STOP position), then application transits INIT state.
Software Design
general software diagram incorporates: Main routine entered from Reset, Interrupt Service Routines (ISR). diagram illustrated Figure 6-4. After Reset, Main routine provides board identification, initialization DSP, initialization application, then enters infinite
DRM031 Rev. MOTOROLA Software Design More Information This Product, www.freescale.com
Designer Reference Manual
Software Design
background loop. background loop contains Fault Detection, Application State Machine, scheduler routine. scheduler routine provides timing sequence tasks called Timeout Timeout Timeout Timeout flags periodically predetermined intervals Conversion Completed ISR. scheduler utilizes these flags calls required routines: routine Timeout provides user interface, calculates required speed, start-up routines speed ramp (acceleration/deceleration). routine Timeout calculates Speed Controller.
Timeout Timeout tasks performed state, instead interrupt routines, order reduce time avoid software bottlenecks. following interrupt service routines utilized: Conversion Completed services provides control tasks linked event; synchronized with pulses. Fault services faults invoked external hardware faults. services master software communication. Push Button services Push Button. Push Button Down services Down Push Button. Timer Compare services Commutation Callback
Designer Reference Manual Software Design More Information This Product, www.freescale.com
DRM031 Rev. MOTOROLA
Software Design Software Design
Interrupt Service Routines
Conversion Completed Interrupt
RESET
Interrupt Handlers
done
Initialize Application
done
Background Tasks
Fault Interrupt
Fault Detection Fault Interrupt Handler
done Interrupt done
Application State Machine
done Timeout
master software Interrupt Handler
done IRQ0, IRQ1 Interrupt timeout
Timeout
done done Timeout
Timeout
Push Buttons Interrupt Handlers
done TMRA1 Compare Interrupt
Timeout
Commutation Interrupt Handler
done
Figure 6-4. Software Design General Overview
DRM031 Rev. MOTOROLA Software Design More Information This Product, www.freescale.com Designer Reference Manual
Software Design
6.4.1 Initialization After Reset, initialization performed. beginning initialization, interrupts disabled; initialization they enabled. Initialization: Disable Interrupts Identify power stage board identify High-Voltage Initialize on-chip module triggered simultaneously associate interrupt with conversion completed event sample ADC_A: Current Phase sample ADC_A: DC-Bus Voltage sample ADC_A: Temperature sample ADC_B: Current Phase sample ADC_B: Current Phase sample ADC_B: void Initialize Quadrature Timer on-chip module (position measurement) Quad count mode count repeatedly 1024 Initialize Quadrature Timer on-chip module (commutation callback) Quad count mode count repeatedly, binary roll over Initialize Quadrature Decoder on-chip module sets digital filter input signals connects Quadrature Decoder signals Quadrature Timer
Designer Reference Manual Software Design More Information This Product, www.freescale.com DRM031 Rev. MOTOROLA
Software Design Software Design
Initialize on-chip module: center aligned independent mode, positive polarity modulus frequency 16kHz interrupt reload each pulse FAULT2 (DC-Bus over-current fault) manual mode, interrupt enabled FAULT1 (DC-Bus over-voltage fault) manual mode, interrupt enabled associate interrupt with Fault events
Initialize brake driver Initialize driver Initialize push buttons push buttons interrupts IRQ0, IRQ1
Initialize switch driver switch driver used DSP56F805EVM DSP56F807EVM
Application initialization: individual parameters application their initial values Start conversion Measure offset individual current sensors Measure DC-Bus voltage temperature Calculate application parameters according DC-Bus voltage Initialize Quadrature Timer Driver (ADC-PWM Synchronization) synchronization delay enable Quadrature Timer started first SYNC Initialize Driver synchronization enable 8-sample conversion
DRM031 Rev. MOTOROLA Software Design More Information This Product, www.freescale.com
Designer Reference Manual
Software Design
Initialize variables motor start-up according start-up phase Enable interrupts
6.4.2 Fault Detection Fault Detection routine checks application faults. fault occurs, disables outputs sets application FAULT status. Note that case DC-Bus over-current DC-Bus over-voltage faults, outputs disabled directly internal module fault protection 6.4.7 Fault ISR.
6.4.3 Application State Machine Application State Machine provides transition between individual states application: INIT, STOP, RUN, FAULT. reference, State Diagram.
6.4.4 Scheduler Timeout This routine accessed from main scheduler period Timeout msec). following tasks then performed: Push button filter debounces push button switching noise Start/Stop switch filter debounces Start/Stop switch noise According operating mode, desired speed calculated manual mode according push buttons master software control mode, according master software command Start-up routine performed required start-up switching pattern generated. detailed description refer 4.3.1 Initialization Start-Up. Speed command calculated using acceleration deceleration ramp using desired speed setup
Designer Reference Manual Software Design More Information This Product, www.freescale.com
DRM031 Rev. MOTOROLA
Software Design Software Design
controlled according state drive. indicate STOP state, state FAULT state.
6.4.5 Scheduler Timeout This state accessible from main scheduler period Timeout (2.5 msec). following tasks then performed: Speed controller calculates desired phase current according actual desired speed. speed controller constants determined experimentally during initialization chip.
6.4.6 Conversion Completed Conversion Completed most critical routine most demanding processor time. Most application control processes need linked with this ISR. Analog-to-Digital converter initiated synchronously with reload pulse (center pulse). scans three phase currents, DC-Bus voltage temperature once. When conversion finalized, Completed called. routine provides following services calculations:
DRM031 Rev. MOTOROLA Software Design More Information This Product, www.freescale.com
Reads conversion results (phase currents, noise, DC-Bus voltage, temperature) Calculates offsets phase currents Current controller calculates desired phase voltage according desired actual phase current Provides commutation required Records selected recorder variables master software) Loads registers Calculates references software timers Timer1 Timer2 Enables next synchronization trigger
Designer Reference Manual
Software Design
6.4.7 Fault Fault highest priority interrupt implemented software. case DC-Bus over-current DC-Bus over-voltage fault detection, external hardware circuit generates fault signal, that detected Fault input DSP. signal disables motor control outputs order protect power stage generates Fault interrupt, where fault condition handled. routine records corresponding fault source fault status register.
6.4.8 This interrupt handler provides communication master software service routines. These routines fully independent motor control tasks.
6.4.9 Push Button Up/Down Push Button Interrupt Handlers take care push buttons service. Button Interrupt Handler sets Button flag, Down Button Interrupt Handler sets Down Button flag. desired speed incremented/decremented according debounced Up/Down Button flag.
6.4.10 TMRA1 Compare compare interrupt handler takes care commutation call. This callback routine sets-on commutate flag indicate that commutation required. commutation flag regularly checked conversion-completed routine upon successful compare, commutation routine called perform commutation itself.
Scaling Quantities
motor control application uses fractional representation real quantities except time. N-bit signed fractional format
Designer Reference Manual Software Design More Information This Product, www.freescale.com
DRM031 Rev. MOTOROLA
Software Design Scaling Quantities
represented using 1.[N-1] format sign bit, fractional bits). Signed fractional numbers (SF) following range:
+1.0
6-1.)
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
6-2.)
where:
Fractional Value Real Value fractional number real value [Frac16] real value quantity rpm, etc.]
Real quantity range maximal range quantity, defined application rpm, etc.]
6.5.1 Voltage Scaling application voltages scaled maximal measured voltage. DC-Bus voltage scaling equation following:
DC_BUS u_dc_bus
6-3.)
Where:
u_dc_bus VDC_BUS VMAX scaled variable DC-Bus voltage [Frac16] measured DC-Bus voltage maximal measurable DC-Bus voltage
application, VMAX 407V high voltage platform.
DRM031 Rev. MOTOROLA Software Design More Information This Product, www.freescale.com
Designer Reference Manual
Software Design
other application voltage variables scaled same (active phase voltage u_active, discharge phase voltage u_discharge, DC-Bus under-voltage limit, start-up voltage).
6.5.2 Phase Current Scaling application phase currents scaled maximal measured phase current. active phase current scaling equation following:
active i_active phase_max
6-4.)
Where:
i_active iactive iphase_max scaled variable active phase current [Frac16] measured active phase current maximal measurable phase current
application, iphase_max 5.86A high-voltage platform. other application phase current variables scaled same (desired current i_desired, discharge current i_discharge, current offsets i_phase_A_offset, i_phase_B_offset, i_phase_C_offset).
6.5.3 Electrical Angle Scaling application electrical angle scaled electrical angle aligned position (see Figure 6-5). electrical commutation angle scaling equation following:
on_el theta_on_el aligned_el
6-5.)
Where:
theta_on_el [Frac16] scaled variable electrical commutation angle
Designer Reference Manual Software Design More Information This Product, www.freescale.com
DRM031 Rev. MOTOROLA
Software Design Scaling Quantities
on_el aligned_el
desired commutation angle [oel] electrical angle aligned position [oel].
application, aligned_el 360oel other application electrical angle variables scaled same (angle where stator rotor poles start overlap theta_edge).
start_to_overlap -180
aligned
position
Figure 6-5. Electrical Angle Definition
6.5.4 Speed Scaling Speed scaled maximal speed drive. desired start-up speed, scaling equation following:
start_up omega_desired_startup
6-6.)
Where:
omega_desired_startup scaled variable desired start-up speed [Frac16] start-up desired start-up speed [rpm] maximal speed drive [rpm]
application, 3000 rpm. other application speed variables scaled same (actual speed, omega_actual_mech, speed limits,
DRM031 Rev. MOTOROLA Software Design More Information This Product, www.freescale.com Designer Reference Manual
Software Design
omega_reqMAX_mech omega_reqMIN_mech, push button speed increment, omega_increment_pb).
6.5.5 Duty Cycle Scaling duty cycle scaled maximal duty cycle drive. output duty cycle scaling equation following:
duty_cycle output output_duty_cycle -duty_cycle
6-7.)
Where:
output_duty_cycle duty_cucleoutput duty_cycleMAX scaled variable output duty cycle [Frac16] desired output duty cycle max. applicable duty cycle
application, duty_cycleMAX other application duty cycles scaled same (high duty cycle limits speed controller, start output duty cycle outputDutyCycleStartup).
Velocity Calculation
actual speed motor calculated from time, TimeCaptured, captured on-chip Quadrature Timer between following edges position Hall sensors. actual speed, OmegaActual calculated according following equation:
SpeedCalcConst OmegaActual -TimeCaptured
6-8.)
where:
OmegaActual actual speed [rpm]
TimeCaptured time, terms number timer pulses, captured between edges position sensor
Designer Reference Manual Software Design More Information This Product, www.freescale.com
DRM031 Rev. MOTOROLA
Software Design Velocity Calculation
SpeedCalcConst constant defining relationship between actual speed number captured pulses between edges position sensor
constant SpeedCalcConst calculated
SpeedCalcConst SpeedMin -SpeedMax
6-9.)
where:
SpeedMin minimal measured speed [rpm] maximal measured speed [rpm]
SpeedMax
Minimal measured speed, SpeedMin, given configuration sensors parameters on-chip timer used speed measurement. calculated
NoPulsesPerRev SpeedMin Presc BusClockFreq
6-10.)
where:
NoPulsesPerRev number sensed pulses position sensor single revolution Presc prescaler Quadrature Timer used speed measurements BusClockFreq Clock Frequency [Hz]
Maximal measured speed, SpeedMax, selected
SpeedMax SpeedMin
6-11.)
where:
integer constant greater than
Then speed calculation constant determined
SpeedCalcConst BusClockFreq -NoPulsesPerRev Presc SpeedMax
6-12.)
application:
DRM031 Rev. MOTOROLA Software Design More Information This Product, www.freescale.com Designer Reference Manual
Software Design
NoPulsesPerRev Hall sensor pulses revolution motor Presc BusClockFreq 36*106 SpeedMax 3000
Then, SpeedCalcConst [rev-1]
Designer Reference Manual Software Design More Information This Product, www.freescale.com
DRM031 Rev. MOTOROLA
Designer Reference Manual 3-Ph. Motor Control with Encoder
Section System Setup
Contents
Application Outline Application Description Application Setup Project Files Application Build Execute Warning
Application Outline
system designed drive 3-Ph. motor. application following specifications: motor control using Encoder position determination Targeted DSP56F805EVM DSP56F805 Controller Board Running 3-Ph. Power Stage Uses optoisolasion board HV/LV isolation Speed control loop Motor mode single direction rotation Minimum speed Maximum speed 2500 Manual interface (RUN/STOP switch, UP/DOWN push buttons control, indication)
DRM031 Rev. MOTOROLA System Setup More Information This Product, www.freescale.com
Designer Reference Manual
System Setup
Overvoltage, undervoltage overcurrent fault protection remote control interface (speed set-up) master software remote monitor master software monitor interface (applied voltage, required voltage, required actual speed, START/STOP switch state, fault status, hardware master software speed scope (observes actual desired speed, currents: active, desired, discharge, output duty cycle)
Application Description
3-Ph. Motor Control with Encoder Application demonstrates switched reluctance motor control application using position sensor DSP56F805 processor.
7.3.1 Control Process After RESET application enters INIT state MANUAL mode. When Start/Stop switch detected (using Start/Stop Switch master command) STOP position there faults pending STOP application state entered. When start command detected (using Start/Stop switch master Start button), drive enters application state motor started. following start-up sequence with rotor alignment provided: MOTOR_STOPPED, motor stopped ALIGNMENT_COMMAND, alignment command accepted ALIGNMENT_STAGE_ONE, alignment progress phases switched ALIGNMENT_STAGE_TWO, alignment progress phase switched START_UP_FINISHED, alignment finalized, motor running, start-up finalized
Designer Reference Manual System Setup More Information This Product, www.freescale.com
DRM031 Rev. MOTOROLA
System Setup Application Description
rotor position evaluated with encoder position sensor through timer module channel which into quadrature mode. Channel same module performs commutation call under successful comparing CMP2. Every commutation occurrence, CMP2 anew loaded with recently calculated value, which adjusted advance angle routine considering actual speed, desired current applied voltage across corresponding phase. individual phase supposed switched before overlapping rotor stator teeth.
According control signals (Start/Stop switch, Up/Down push buttons) master commands case master control), reference speed command calculated using acceleration/deceleration ramp. comparison between actual speed command measured speed generates speed error. Based error, speed controller generates desired phase current. When phase commuted, turned-on with duty cycle 100% Output_duty_cycle_startup during motor start-up). Then during each cycle, actual phase current compared with desired current. soon actual current exceeds command one, current controller turned-on. procedure repeated each commutation cycle motor. current controller generates desired duty cycle. Finally, 3-phase Motor Control signals generated.
7.3.2 Drive Protection DC-Bus voltage, DC-Bus current power stage temperature measured during control process. They used overvoltage, undervoltage, overcurrent overtemperature protection drive. undervoltage overtemperature protection performed software while overcurrent overvoltage fault signal utilizes fault inputs DSP. power stage identified using board identification. correct power stage identified, "Wrong Power Stage" fault disables drive operation. line voltage measured during application initialization. According detected level, mains set. line voltage detected -15% +10% nominal voltage, "Out Mains Limit" fault disables drive operation.
DRM031 Rev. MOTOROLA System Setup More Information This Product, www.freescale.com Designer Reference Manual
System Setup
above mentioned faults occur, motor control outputs disabled order protect drive, application enters FAULT state. FAULT state left only when fault conditions disappear Start/Stop switch toggled through STOP position. application External Flash memory 3-phase High-Voltage Power Stage powered 115V 230V Manual Master Operating Mode
correct power stage voltage level identified automatically appropriate constants set. 3-phase motor control application operate modes: Manual Operating Mode drive controlled RUN/STOP switch. motor speed DOWN push buttons (see Figure 7-1). actual state application indicated user LEDs (see Figure 7-2). application runs motor spinning disabled (i.e., system ready), GREEN user will flash frequency 2Hz. When motor spinning enabled, GREEN user will fault occurs power stage, GREEN user will flash frequency 8Hz. actual state outputs indicated output LEDs.
Designer Reference Manual System Setup More Information This Product, www.freescale.com
DRM031 Rev. MOTOROLA
System Setup Application Description
Figure 7-1. RUN/STOP Switch UP/DOWN Buttons DSP56F805EVM
Figure 7-2. USER LEDs DSP56F805EVM
DRM031 Rev. MOTOROLA System Setup More Information This Product, www.freescale.com Designer Reference Manual
System Setup
Table 7-1. Motor Application States
Application State Stopped Running Fault Motor State Stopped Spinning Stopped Green State Blinking frequency Blinking frequency
master software (Remote) Operating Mode 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 speed motor. following master control actions supported: master mode motor control system manual mode motor control system Start motor Stop motor required speed motor
master displays following information: Required speed motor Actual speed motor Application status Init/Stop/Run/Fault voltage level Identified line voltage Fault Status Identified power stage
Designer Reference Manual System Setup More Information This Product, www.freescale.com
DRM031 Rev. MOTOROLA
System Setup Application Description
Start master software window application executing 3ph_srm_Encoder.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 software project been launched, this option selected master software window under Project/Select Other FileReload.
Figure 7-3. Master Software Control Window
DRM031 Rev. MOTOROLA System Setup More Information This Product, www.freescale.com
Designer Reference Manual
System Setup Application Setup
Figure illustrates hardware set-ups 3-phase motor control applications. motor's Encoder connector attached connector Board required motor operation. serves only master position reference.
Figure 7-4. Setup 3-Phase Motor Control Application Using DSP56F805EVM
Designer Reference Manual System Setup More Information This Product, www.freescale.com
DRM031 Rev. MOTOROLA
System Setup Application Setup
system consists following components: Switched reluctance motor Type Brno s.r.o., Czech Republic Load Type 40N, Brno s.r.o., Czech Republic Encoder 16.05A1024-12-5, Baumer Electric, Switzerland 3-ph. Power Stage supplied ECINLHIVSR
Optoisolation Board ECOPT
DSP56F805 Board: DSP56F805 Evaluation Module, supplied DSP56F805EVM DSP56F805 Controller Board
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).
7.4.1 Application Setup Using DSP56F805EVM execute Motor Control with Encoder, DSP56F805EVM board requires strap settings shown Figure Table 7-2.
DRM031 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 7-5. DSP56F805EVM Jumper Reference
Table 7-2. 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
DRM031 Rev. MOTOROLA
System Setup Project Files
Table 7-2. DSP56F805EVM Jumper Settings
Jumper Group JG10 JG11 JG12 JG13 Comment Secondary UNI-3 Analog temperature input unused Host power Host target interface Primary Encoder input selected quadrature encoder 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,
JG14 JG15 JG16 JG17 JG18
NOTE:
When running target system stand-alone mode from Flash, jumper must configuration disable command converter parallel port interface.
Project Files
motor control application composed following files: main program application project file application configuration file linker command file external linker command file Flash
DRM031 Rev. MOTOROLA System Setup More Information This Product, www.freescale.com
Designer Reference Manual
System Setup
configuration file Flash master software file
These files located application folder.
Motor control algorithms used application:
.\controller.c, source header files controller .\ramp.c, source header files ramp generation .\SrmCmt3Ph2spp.c, source header files Motor commutation algorithm .\srmcac.c, source header files mechanical electrical quantities calculation algorithms
Other functions used application: .\boardId.c, source header files board identification function
necessary resources (algorithms peripheral drivers) part application project file. resources copied into following folder under application folder: folder general C-header files folder device specific source files, e.g. drivers folder master software source files folder algorithms .\3ph_srm_Encoder_sa\src\bsp\, folder board identification function source file
Designer Reference Manual System Setup More Information This Product, www.freescale.com
DRM031 Rev. MOTOROLA
System Setup Application Build Execute
Application Build Execute
When building 3-Ph. motor control application with encoder, user create application that runs from internal Flash External RAM. select type application build, open 3ph_srm_Encoder.mcp project select target build type, shown Figure 7-6. definition projects associated with these target build types viewed under Targets project window.
Figure 7-6. Target Build Selection make this application, open 3ph_srm_Encoder.mcp project file execute Make command, shown Figure 7-7. This will build link 3-phase Encoder Motor Control application.
DRM031 Rev. MOTOROLA System Setup More Information This Product, www.freescale.com
Designer Reference Manual
System Setup
Figure 7-7. Execute Make Command execute 3-phase Motor 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 code generated during Build. External target selected, executable code 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; motor will spinning. speed changed means UP/DOWN push buttons from minimal value maximal value.
NOTE:
RUN/STOP switch position when application starts, toggle RUN/STOP switch between STOP
DRM031 Rev. System Setup More Information This Product, www.freescale.com MOTOROLA
Designer Reference Manual
System Setup Warning
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. 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.
DRM031 Rev. MOTOROLA System Setup More Information This Product, www.freescale.com
Designer Reference Manual
System Setup
Power transistors, coil, motor reach temperatures enough cause burns. When powering down; storage capacitors, dangerous voltages present until power-on off.
Designer Reference Manual System Setup More Information This Product, www.freescale.com
DRM031 Rev. MOTOROLA
Designer Reference Manual 3-Ph. Motor Control with Encoder
Appendix References
Miller, T.J.E., Switched Reluctance Motors Their Control, Magna Physics Publishing Clarendon Press, ISBN 0-19-859387-2, 1993
AN1937 3-Phase Switched Reluctance Motor Control with Encoder Using DSP56F80x, Motorola Inc., 2002 DSP56F80x 16-bit Digital Signal Processor, User's Manual, DSP56F801-7UM/D, Motorola Inc., 2001 DSP56F800 16-bit Digital Signal Processor, Family Manual, DSP56F800FM/D, Motorola Inc., 2001 Motorola Embedded Motion Control 3-Phase Switched Reluctance High-Voltage Power Stage User's Manual, MEMC3PSRHVPSUM/D, Motorola Inc., 2000 Motorola Embedded Motion Control 3-Phase Switched Reluctance Low-Voltage Power Stage User's Manual, MEMC3PSRLVPSUM/D, Motorola Inc., 2000 DSP56F805 Evaluation Module Hardware User's Manual, DSP56F805EVMUM/D, MotorolaInc., 2001 Motorola Embedded Motion Optoisolation Board User's Manual, MEMCOBUM/D, Motorola Inc., 2000 Parallel Command Converter Hardware User's Manual, MCSL, MC108UM2R1 User Manual master software, Motorola Inc., 2001 CodeWarrior Motorola DSP56800 Embedded Systems, CWDSP56800, Metrowerks, 2001
DRM031 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
DRM031 Rev. MOTOROLA
Designer Reference Manual 3-Ph. Motor Control with Encoder
Appendix Glossary
Alternating Current. Analogue-to-Digital Converter
brush component transfering electrical 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

Other recent searches


XZBB46W-8 - XZBB46W-8   XZBB46W-8 Datasheet
STD95N3LLH6-H - STD95N3LLH6-H   STD95N3LLH6-H Datasheet
SCCS064B - SCCS064B   SCCS064B Datasheet
MIC2569 - MIC2569   MIC2569 Datasheet
FM137AS7 - FM137AS7   FM137AS7 Datasheet
2SB1219A - 2SB1219A   2SB1219A Datasheet

 

Privacy Policy | Disclaimer
© 2012 Datasheet Archive