| The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers. |
3-Phase Motor Sensorless Control Reference Design Designer Refere
Top Searches for this datasheet3-Phase Motor Sensorless Control Reference Design Designer Reference Manual 56800 Hybrid Controller DRM030//D Rev. 03/2003 MOTOROLA.COM/SEMICONDUCTORS More Information This Product, www.freescale.com More Information This Product, www.freescale.com 3-Phase Motor Sensorless Control Reference Design Designer Reference Manual Radim Visinka, Jaroslav Musil Motorola Czech Systems Laboratories Roznov Radhostem, Czech Republic DRM030 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 February 2003 Revision Level Initial release Description Page Number(s) Designer Reference Manual DRM030 MOTOROLA More Information This Product, www.freescale.com Designer Reference Manual 3-Phase Sensorless Control List Sections Section Introductuion Section Control Theory Section System Concept Section Hardware Section Software Design Section Application Setup Appendix References. Appendix Glossary. DRM030 MOTOROLA Designer Reference Manual More Information This Product, www.freescale.com List Sections Designer Reference Manual DRM030 MOTOROLA More Information This Product, www.freescale.com Designer Reference Manual 3-Phase Sensorless Control Table Contents Section Introductuion Contents Introduction Motorola Advantages Features Section Control Theory Contents Target Motor Theory Techniques Sensorless Control Motors. Section System Concept Contents System Outline Application Description Section Hardware DRM030 MOTOROLA Contents System Configuration DSP56F805EVM Control Board 3-Phase Switched Reluctance High-Voltage Power Stage Optoisolation Board Motor-Brake Specifications. Hardware Documentation Designer Reference Manual More Information This Product, www.freescale.com Table Contents Section Software Design Contents Introduction Implementation Notes. Section Application Setup Contents Application Description Application Set-Up Projects Files .110 Application Build Execute Appendix References Appendix Glossary Designer Reference Manual DRM030 MOTOROLA More Information This Product, www.freescale.com Designer Reference Manual 3-Phase Sensorless Control List Figures Figure 2-10 2-11 2-12 2-13 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 Reference Magnetization Curve Constant Position. Pos. Estimation using Reference Flux Linkage Function Flux Linkage Phase Current System Concept Start-Up Sequence Control Flow Diagram Flux Linkage Func. Phase Current Aligned Pos. Shunt Resistors Current Sensors Soft Switching Current Shunt Resistors. Phase Current Measured Current Shunt Resistors Measured 3-Phase Currents with without Noise Correction Implemented Temperature Sensor Topology 3-Phase High Voltage Platform Configuration Block Diagram DSP56F805EVM DSP56F805EVM Jumper Reference Connecting DSP56F805EVM Cables Block Diagram DRM030 MOTOROLA Designer Reference Manual More Information This Product, www.freescale.com List Figures Inductance Characteristic System Data Flow Speed Current Control System Data Flow Commutation Application State Diagram Software Design General Overview Electrical Angle Definition RUN/STOP Switch UP/DOWN Buttons USER LEDs DSP56F805EVM. Master Software Control Window Set-up 3-Phase Motor Control Application DSP56F805EVM Jumper Reference Target Build Selection. Execute Make Command Designer Reference Manual DRM030 MOTOROLA More Information This Product, www.freescale.com Designer Reference Manual 3-Phase Sensorless Control List Tables Table Title Page Memory Configuration Commutation Sequence Reference Phase DSP56F805EVM Default Jumper Options Electrical Characteristics Electrical Characteristics Motor Brake Specifications. Motor Application States. DSP56F805EVM Jumper Settings DRM030 MOTOROLA Designer Reference Manual More Information This Product, www.freescale.com List Tables Designer Reference Manual DRM030 MOTOROLA More Information This Product, www.freescale.com Designer Reference Manual 3-Phase Sensorless Control Section Introductuion Contents Introduction Motorola Advantages Features Introduction This paper describes design sensorless 3-Phase (Switched Reluctance) motor drive. based Motorola DSP56F805. software design takes advantage Quick_Start developed Motorola. 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. Availability moderate cost necessary electronic components make drives viable alternative other commonly used motors like BLDC, Synchronous universal motors numerous applications. concept this application that sensorless speed closed loop drive with inner current loop using flux linkage position estimation. change phase resistance during motor operation temperature dependency creates errors position estimation significantly affects performance drive. Therefore, novel algorithm on-the-fly estimation phase resistance included. This application demonstrates sensorless motor drive serves example system design using Motorola DSP. also illustrates usage dedicated motor control algorithm libraries. application helps start development sensorless drive dedicated targeted application. DRM030 MOTOROLA Introductuion More Information This Product, www.freescale.com Designer Reference Manual Introductuion This paper includes description Motorola features, basic motor theory, system design concept, hardware implementation, software design including master software visualization tool. Motorola Advantages Features Motorola DSP56F805 well suited digital motor control, combining DSP's computational ability with MCU's controller features single chip. These DSP's 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. 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 dead time insertion; supports both center- edge-aligned modes Twelve-bit, Analog-to-Digital Converters (ADCs), supporting simultaneous conversions with dual 4-pin multiplexed inputs; synchronized Quadrature Decoders (Quad Dec0 Quad Dec1), each with four inputs, additional Quad Timers dedicated General Purpose Quad Timers totaling pins: Timer with pins Timer with pins Module with 2-pin ports used transmit receive Serial Communication Interfaces (SCI0 SCI1), each with pins, four additional GPIO lines Serial Peripheral Interface (SPI), with configurable 4-pin port, four additional GPIO lines Computer Operating Properly (COP) Watchdog Timer dedicated external interrupt pins DRM030 Introductuion More Information This Product, www.freescale.com MOTOROLA Designer Reference Manual Introductuion Motorola Advantages Features Fourteen dedicated General Purpose (GPIO) pins, multiplexed GPIO pins external reset hardware reset JTAG/On-Chip Emulation (OnCE) software-programmable, phase lock 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 From switched reluctance motor control point view, most interesting peripherals fast Analog-to-Digital Converter (ADC) Pulse-Width-Modulation (PWM) on-chip modules. They offer freedom configuration, enabling efficient sensorless control motors. module incorporates generator, enabling generation control signals motor power stage. module following features: DRM030 MOTOROLA Introductuion More Information This Product, www.freescale.com 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- center-aligned signals Designer Reference Manual Introductuion bits resolution Integral reload rates from with half-cycle reload capability Individual software-controlled output Programmable fault protection Polarity control 20-mA 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: 12-bit resolution Maximum clock frequency 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 Designer Reference Manual Introductuion More Information This Product, www.freescale.com DRM030 MOTOROLA Introductuion 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. DRM030 MOTOROLA Introductuion More Information This Product, www.freescale.com Designer Reference Manual Introductuion Designer Reference Manual Introductuion More Information This Product, www.freescale.com DRM030 MOTOROLA Designer Reference Manual 3-Phase Sensorless Control Section Control Theory Contents Target Motor Theory 2.2.1 Switched Reluctance Motor 2.2.2 Mathematical Description Motor 2.2.3 Digital Control Motor 2.2.4 Voltage Current Control Motors. Techniques Sensorless Control Motors. 2.3.1 Sensorless Pos. Estimation using Flux Linkage Estimation. 2.3.2 Flux Linkage Calculation Discrete Time Domain. 2.3.3 Sensorless On-the-fly Resistance Estimation Target Motor Theory 2.2.1 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. DRM030 MOTOROLA Control Theory More Information This Product, www.freescale.com Designer Reference Manual Control 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 line with stator poles selected phase, phase said unaligned position, i.e., 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. When Designer Reference Manual Control Theory More Information This Product, www.freescale.com DRM030 MOTOROLA Control Theory Target Motor Theory respective phase powered, interval called dwell angle dwell. defined turn-on turn-off angles. 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 where 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. 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. DRM030 MOTOROLA Designer Reference Manual Control Theory More Information This Product, www.freescale.com Control 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. Since high-speed operation possible, 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. 2.2.2 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 Control Theory More Information This Product, www.freescale.com DRM030 MOTOROLA Control Theory Target Motor Theory development implementation sophisticated algorithms controlling motor 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 characteristic 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 DRM030 MOTOROLA Control Theory More Information This Product, www.freescale.com Designer Reference Manual Control Theory resistance phase inductance. diagram phase illustrated Figure 2-4. Lph=f() Figure 2-4. Electrical Diagram Motor Phase According diagram, voltage applied phase motor described voltage drops phase resistance induced voltages phase inductance: (2-1) where: applied phase voltage phase resistance phase current uLph induced voltage 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 Control Theory More Information This Product, www.freescale.com DRM030 MOTOROLA Control Theory Target Motor Theory Then phase voltage expressed (2-3) (2-4) where: electrical 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. 2.2.3 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 DRM030 MOTOROLA Control Theory More Information This Product, www.freescale.com Designer Reference Manual Control Theory 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. enables control individual phases fully independent each other thus permits widest freedom control. Other power stage topologies share some power devices several phases, thus saving power stage cost, with these phases cannot fully independently controlled. 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 left turned-on during whole commutation period applied other Hard switching where applied both transistors simultaneously Designer Reference Manual DRM030 Control Theory More Information This Product, www.freescale.com MOTOROLA Control Theory Target Motor Theory 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. DRM030 MOTOROLA Control Theory More Information This Product, www.freescale.com Designer Reference Manual Control 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 2.2.4 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 Control Theory More Information This Product, www.freescale.com DRM030 MOTOROLA Control Theory Target Motor Theory 2.2.4.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 DRM030 MOTOROLA Control Theory More Information This Product, www.freescale.com Designer Reference Manual Control 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.2.4.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 Control Theory More Information This Product, www.freescale.com DRM030 MOTOROLA Control Theory Target Motor Theory 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 DRM030 MOTOROLA Control Theory More Information This Product, www.freescale.com Designer Reference Manual Control Theory idesired phase current decays through back diodes UDC-Bus position time position time Current Controller Output 100% -UDC-Bus Figure 2-10. Current Control Technique Voltage Current Profiles individual phases motor need turned such position that phase current able rise desired level. basic condition specifies that phase current needs achieve least desired level position where stator rotor phases start overlap. After overlap position, phase current starts decrease positive change inductance. phase turned late, phase current able reach desired level commutation stroke. turn-on position needs determined according applied phase voltage, actual motor speed inductance profile motor. phase turned position minimal inductance, inductance considered constant until position where stator rotor poles start overlap. constant inductance, phase current considered linearly rising. Then time required achieve desired current determined from (2-3) Designer Reference Manual Control Theory More Information This Product, www.freescale.com DRM030 MOTOROLA Control Theory Techniques Sensorless Control Motors desired phase (2-9) where: required time achieve desired current unaligned inductance duty cycle idesired desired current achieved uDC_Bus DC-Bus voltage electrical angle corresponding time required reach desired current determined actual (2-10) where: actual actual speed. Techniques Sensorless Control Motors 2.3.1 Sensorless Pos. Estimation using Flux Linkage Estimation flux linkage estimation method belongs among most popular sensorless position estimation techniques. number methods that flux linkage calculation have been developed. These methods calculate actual phase flux linkage relation reference flux linkage position estimation. method implemented this application based comparison estimated flux linkage reference flux linkage, defined turn-off (commutation) position. When estimated flux linkage reaches desired reference flux linkage indicates that commutation position reached. actual phase turned following phase turned DRM030 MOTOROLA Control Theory More Information This Product, www.freescale.com Designer Reference Manual Control Theory reference flux linkage derived from magnetization characteristic function phase current desired commutation position (see Figure 2-11). ref_actual ref(iphase), const Iphase_actual iphase Figure 2-11. Reference Magnetization Curve Constant Position order simplify determination reference flux linkage, assume that constant current, flux linkage rises linearly interval between unaligned aligned positions. This assumption considered region expected commutation. Then reference flux linkage derived from flux linkage aligned position Aligned (2-11) where k(off) linear function corresponding commutation angle. reach value interval corresponds unaligned position, corresponds aligned position). reference magnetization curve (iph) aligned position Aligned stored controller memory. estimated flux linkage turned-on phase calculated using following equation: Designer Reference Manual Control Theory More Information This Product, www.freescale.com DRM030 MOTOROLA Control Theory Techniques Sensorless Control Motors (2-12) where: voltage applied motor phase (coil) winding actual phase current phase resistance flux linkage estimation starts when phase turned simultaneously sampled phase current phase voltage measured periodically predetermined intervals flux linkage estimated. Each time flux linkage calculated, compared with reference level taken from reference magnetization curve function actual phase current. When estimated flux linkage exceeds reference flux linkage, indicates that switching position been reached commutation performed. method illustrated Figure 2-12. =off R.iph Magnetization Curve ref(iph), const Figure 2-12. Pos. Estimation using Reference Flux Linkage Function advantage flux linkage estimation methods that they usable over wide speed ranges, from start-up high speeds. position accurately estimated phase resistance determined correctly. Four-quadrant operation possible. DRM030 MOTOROLA Control Theory More Information This Product, www.freescale.com Designer Reference Manual Control Theory main disadvantage these methods that estimation flux linkage based precise knowledge phase resistance. phase resistance varies significantly with temperature which yields unwanted integration errors, especially speed. integration error creates significant position estimation error. Note that powerful DSP-based controllers (like DSP56F80x) easily perform needed calculations sensorless flux linkage algorithm. 2.3.2 Flux Linkage Calculation Discrete Time Domain introduced algorithm flux linkage estimation used both analog digital controllers. Digital control preferred today reasons cost, flexibility performance. digital systems, flux linkage calculation based (2-12) needs converted discrete time domain. flux linkage estimation performed regularly sampling frequency measurements phase voltage phase current. Equation (2-12) converted (2-13) where: sampling period sampled phase voltage sampled phase current sampled phase resistance calculated flux linkage sample flux linkage calculated regularly each sampling cycle from beginning commutation stroke (t1). sampling period constant. Equation (2-13) transformed following form: (2-14) where: Designer Reference Manual Control Theory More Information This Product, www.freescale.com DRM030 MOTOROLA Control Theory Techniques Sensorless Control Motors calculated flux linkage previous measuring cycle (N-1). order decrease computational requirements, equation (2-14) transferred (2-15) instead pure flux linkage, flux linkage divided sampling period calculated. Because sampling period kept constant, division considered scaling factor. proper functionality position estimation algorithm, reference flux linkage scaled same way. 2.3.3 Sensorless On-the-fly Resistance Estimation resistance phase winding most decisive factors magnetic flux linkage estimation (2-12). During motor operation, variation resistance exceed nominal value because phase resistance depends strongly temperature. effect phase resistance drift more significant low- middle-speed ranges, where voltage drop winding comparable phase supply voltage uph. This variation causes inaccurate estimation flux linkage, hence generates position estimation errors and, based such magnetic flux estimations, sensorless techniques give satisfactory results. Therefore, case accurate robust sensorless control algorithm, actual value winding resistance must accurately measured estimated during motor operation. order improve behavior sensorless flux linkage estimation algorithm, on-the-fly phase resistance estimator been invented. resistance estimation algorithm patented 6,366,865 Patent Office. development phase resistance estimation based flux linkage estimator (2-12). flux linkage estimator calculates flux linkage time using following formula: DRM030 MOTOROLA Control Theory More Information This Product, www.freescale.com Designer Reference Manual Control Theory (2-16) Where: voltage applied motor phase (coil) winding phase current assumed phase winding resistance time when motor phase winding starts energized assumed phase winding resistance actual phase winding resistance resistance error resistance error caused temperature drift, inaccurately obtained value, etc. (2-17) Figure 2-13 illustrates flux linkage waveforms calculated flux linkage estimator during typical working cycle phase motor. Unlike sensorless flux linkage estimation method, where flux linkage calculated phase commutation angle off, flux linkage calculated whole time during which current flowing through phase. phase current shape flux linkage defined control strategy, rotor position, magnetization characteristic. motors driven that motor phases energized sequentially phase current therefore rises from zero, beginning cycle where phase turned off, where phase disconnected then falls down zero again cycle (t2). seen, flux linkage rises during interval between turn-on (t1) turn-off angles phase. When phase turned off, flux linkage decreases until phase current disappears. parameters (2-16) obtained correctly, resistance error zero, then flux linkage equal zero seen Figure 2-13. (2-18) Designer Reference Manual Control Theory More Information This Product, www.freescale.com DRM030 MOTOROLA Control Theory Techniques Sensorless Control Motors influence resistance error, let's assume that: phase voltage phase current were measured correctly measurement error ignored resistance error equal zero, affects estimation flux linkage. Because flux estimation result integration (see Figure 2-13), total flux estimation error working cycle (t2) quite significant. time position Error Error time position Figure 2-13. Flux Linkage Phase Current resistance estimation algorithm based fact that phase current zero, then magnetic flux must zero well. Resistance error leads flux estimation error (see Figure 2-13). Thus, enables calculate flux estimation error point time (t2) when phase current falls zero. DRM030 MOTOROLA Control Theory More Information This Product, www.freescale.com Designer Reference Manual Control Theory phEstim Error (2-19) Because flux linkage time equal zero (2-18), estimation error equal phEstim Error (2-20) Based equation 4-10, apparent that flux linkage estimation error positive, resistance error negative; flux linkage estimation error negative, resistance error positive. Error Error (2-21) (2-22) assume that rate change phase resistance small during commutation motor (this valid temperature drift): (2-23) Using above assumption, equation (2-20) rewritten following: EstErr (2-24) Then resistance error expressed EstErr (2-25) Equation 4-15 illustrates that resistance error expressed ratio between calculated flux linkage error time where Designer Reference Manual Control Theory More Information This Product, www.freescale.com DRM030 MOTOROLA Control Theory Techniques Sensorless Control Motors phase current decreases zero, integral phase current, both which calculated over complete phase current pulse. DRM030 MOTOROLA Control Theory More Information This Product, www.freescale.com Designer Reference Manual Control Theory Designer Reference Manual Control Theory More Information This Product, www.freescale.com DRM030 MOTOROLA Designer Reference Manual 3-Phase Sensorless Control Section System Concept Contents System Outline Application Description 3.3.1 Application Concept 3.3.2 Initialization Start-Up 3.3.3 Commutation Algorithm Resistance Estimation 3.3.4 Current Voltage Measurement 3.3.5 Current Sensing 3.3.6 Voltage Sensing 3.3.7 Power Module Temperature Sensing. System Outline This system designed drive 3-Phase motor. application meets following performance specifications: Sensorless speed control motor using flux linkage estimation technique with inner-current closed loop Targeted DSP56F805EVM 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 phase resistance measurement during start-up phase resistance estimation speeds motor starts from position with rotor alignment DRM030 MOTOROLA System Concept More Information This Product, www.freescale.com Designer Reference Manual System Concept direction rotation motoring mode minimal speed maximal speed 2600RPM input power line 230V maximal speed 1600RPM input power line 115V Encoder position reference evaluation position estimation visualized master software (not used control technique) Manual interface (start/stop switch, up/down push button control, indicator) master software control interface (motor start/stop, speed set-up) 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 desired current) start-up recorder (observes start-up phase current, flux linkage, output duty cycle encoder position reference with fine resolution) flux linkage recorder (observes phase current, estimated flux linkage, reference flux linkage encoder position reference with fine resolution) current controller recorder (observes actual desired phase current, output duty cycle encoder position reference with fine resolution) Power stage identification DC-Bus over-voltage, DC-Bus under-voltage, DC-Bus over-current over-heating fault protection Designer Reference Manual System Concept More Information This Product, www.freescale.com DRM030 MOTOROLA System Concept Application Description Application Description 3.3.1 Application Concept drive, standard system concept chosen (see Figure 3-1). system incorporates following hardware parts: 3-Phase high-voltage development platform (power stage with optoisolation board, motor with attached brake) Feedback sensors: DC-Bus voltage, DC-Bus current, phase currents, temperature DSP56F805 controller 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. DRM030 MOTOROLA System Concept More Information This Product, www.freescale.com Designer Reference Manual System Concept 3-phase Power Stage Line DC-Bus Voltage Phase Current Temperature LOAD DSP56F80x START STOP DOWN Req. Speed Speed Ramp Desired Speed Speed Error Speed Controller Desired Current Current Error Current Controller Duty Cycle Fault Protection Generation Commutation DC-Bus Voltage Commutation Angle Calculation Commut. Angle Phase Current Remote Control Comparator DC-Bus Voltage Estim. Flux Flux Linkage Resistance Estimation Refer. Flux Reference Flux Linkage Calculation Commut. Angle Actual Current Actual Speed Speed Calculation Commutation Figure 3-1. System Concept After RESET drive initialized automatically enters MANUAL operational mode. Note, master software only take over control when motor stopped. When Start command detected (using Start/Stop switch master software button "Start") while fault pending, application started. Rotor position evaluated using sensorless flux linkage estimation algorithm. actual flux linkage calculated rate frequency compared with reference flux linkage given commutation angle. commutation angle calculated according desired speed, desired current actual DC-Bus voltage. When actual flux linkage exceeds reference, commutation phases desired direction rotation done; actual phase Designer Reference Manual System Concept More Information This Product, www.freescale.com DRM030 MOTOROLA System Concept Application Description turned following phase turned Flux linkage error used estimation phase resistance speeds Patent No.: 6,366,865). actual speed motor determined using commutation instances. 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% nominal voltage, fault "Out Mains Limit" disables drive operation. above mentioned faults occur, motor control outputs disabled order protect drive. fault status only exited when fault conditions have disappeared Start/Stop switch moved 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 DRM030 MOTOROLA System Concept More Information This Product, www.freescale.com Designer Reference Manual System Concept switching power devices. Since application software could accidentally loaded into BLDC drive, software incorporates protection feature prevent this. 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, "Wrong Power Stage" fault disables drive operation. 3.3.2 Initialization Start-Up Before motor started, rotor alignment initialization control algorithms must performed (see Figure 3-2). Initialization control algorithm includes measurement actual start-up phase resistance. First, rotor needs aligned known position able start motor desired direction rotation. This done following steps: phases (Phases turned simultaneously After 50msec phase (Phase turned off, other phase (Phase stays powered After additional msec, rotor stabilized enough 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. Designer Reference Manual System Concept More Information This Product, www.freescale.com DRM030 MOTOROLA System Concept Application 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 3-2. Start-Up Sequence DRM030 MOTOROLA System Concept More Information This Product, www.freescale.com Designer Reference Manual System Concept When rotor stabilized known position, measurement phase resistance powered phase performed. Phase resistance calculated from measured phase current iph, DC-Bus voltage UDC-Bus applied duty cycle assumed that resistance three phases identical. phase resistance calculated DCBus (3-1) total, stabilization resistance measurement take sec. After this time, rotor stable enough reliably start motor desired direction rotation. When phase resistance been measured, motor started commutation phases (turning stabilization Phase applying power start-up Phase This starting sequence followed every start-up motor because neither initial rotor position actual phase resistance known. 3.3.3 Commutation Algorithm Resistance Estimation core control algorithm includes calculation commutation angle, flux linkage, reference flux, commutation phases estimation phase resistance. Calculation commutation angle calculation performed regularly during motor operation according (2-1) (2-2). Flux linkage estimated during complete current stroke powered phase, from moment phase turned until moment phase current disappears. serves both position estimation (determination commutation instance) resistance estimation. Commutation motor phases based comparison actual estimated flux linkage reference flux linkage required commutation angle (see Section 2.3.1). Phase resistance estimated according flux linkage error, which Designer Reference Manual System Concept More Information This Product, www.freescale.com DRM030 MOTOROLA System Concept Application Description captured moment phase current disappears (see Section 2.3.3). detailed block diagram control algorithm shown Figure 3-3. control process starts moment given phase turned either during start-up (after rotor aligned commutated. When phase turned (on), phase current phase voltage measured simultaneously center pulses. phase current, iph, measured directly using phase current sensing circuitry with noise elimination implemented, while phase voltage, uph, calculated according measured DC-Bus voltage actual duty cycle DCBus (3-2) measured phase current DC-Bus voltage used calculating actual flux linkage actual (2-7). DRM030 MOTOROLA System Concept More Information This Product, www.freescale.com Designer Reference Manual System Concept Turn-on Phase (Commutate) Measure iph, Calculate Calculate actual active iactive time actual Commutate Phases Calc. Commutation Angle actual discharge discharge idischarge time Measure idischarge, Calculate discharge idischarge Capture error Filter error error idischarge=0 time error_filtered Decrease Increase Figure 3-3. Control Flow Diagram Designer Reference Manual System Concept More Information This Product, www.freescale.com DRM030 MOTOROLA System Concept Application Description reference flux linkage given commutation angle function phase current iph, f(iph ,off reference flux linkage characteristic aligned position needs derived from motor magnetization characteristic. Such characteristic tested motor shown Figure 3-4. Compare with Figure 2-11 which illustrates general magnetization curve. seen, measured characteristic linear work linear part magnetization characteristic. other positions, reference flux linkage calculated according (2-3). 0.50 0.40 Flux Linkage [Frac16] 0.30 0.20 0.10 0.00 0.000 0.200 0.400 0.600 0.800 1.000 Phase Current [Frac16] Figure 3-4. Flux Linkage Func. Phase Current Aligned Pos. estimated flux linkage actual compared with reference flux linkage ref. estimated value lower than reference value, estimation continues regularly sampling frequency. When estimated value reaches reference value, this indicates that desired position achieved. that moment, commutation phases performed powered phase turned following phase, direction rotation, turned flux linkage DRM030 MOTOROLA System Concept More Information This Product, www.freescale.com Designer Reference Manual System Concept calculation determining following commutation event starts again initial values zero. When phase turned off, phase current starts decrease phase discharged. flux linkage discharge continues calculated regularly rate sampling period (PWM frequency) during phase current discharge. discharge phase current idischarge monitored. soon phase current approaches zero, flux linkage error Error captured. flux linkage error corresponds phase resistance error used flux linkage calculation. flux linkage error then filtered through several samples order eliminate calculation, measurement, noise error. filtered value used evaluation phase resistance according (2-21) (2-22). filtered flux linkage error greater than zero, estimated phase resistance increased small amount (0.1%). opposite case, estimated phase resistance decreased small amount (0.1%). corrected resistance value then used during next flux linkage estimation process. this way, phase resistance tracked throughout operation. 3.3.4 Current Voltage Measurement Precise phase current DC-Bus voltage measurement factor implementation sensorless flux linkage estimation. inaccuracy measurement leads flux linkage estimation error thus position estimation error resistance estimation error. 3.3.5 Current Sensing Current measurement needs investigated according current sensors used influence noise measurement. 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 Designer Reference Manual System Concept More Information This Product, www.freescale.com DRM030 MOTOROLA System Concept Application Description inserted into current path phase often used (see Figure 3-5). phase current sensed voltage drop across sense resistor. Voltage PWM_T1 Phase PWM_T2 sense V_ref 1.65V Figure 3-5. 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 3-6. phase current visible only when both switches turned (the phase current flows through switches sensing resistor) when both switches turned (phase current flows through freewheeling diodes sensing resistor). When both switches phase turned measured current negative, needs inverted. diagram shows that reliable current shape reconstruction, sensing needs synchronized with frequency center pulse both positive negative voltage drop polarities should DRM030 MOTOROLA System Concept More Information This Product, www.freescale.com Designer Reference Manual R_sense sense System Concept 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. Designer Reference Manual System Concept More Information This Product, www.freescale.com DRM030 MOTOROLA System Concept Application Description Switch (T1) Time Bottom Switch (T2) Time Actual Phase Current Time Sensed Voltage Drop Time Synchronization Figure 3-6. Soft Switching Current Shunt Resistors DRM030 MOTOROLA System Concept More Information This Product, www.freescale.com Designer Reference Manual System Concept 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 3-7. Phase Current Measured Current Shunt Resistors cost shunt resistor sensors bring serious issue. low-voltage drop sensed across shunt current resistors, measured signals susceptible noise. Based assumption that same noise induced simultaneously measured signals, technique noise elimination been developed successfully implemented. 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 (3-3) (3-4) Designer Reference Manual System Concept More Information This Product, www.freescale.com DRM030 MOTOROLA System Concept Application Description noise same, eliminated subtraction reference signal from measured signal. described above, necessary condition simultaneous sampling both signals, ensuring that noise both signals identical. This technique been implemented phase current sensing. motor controlled which phases commutated sequentially, which means that 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: Imeasured Ireference (3-6) reference signal needs commutated together with commutation phases. Table defines active, discharge reference phases commutation sequence derived from Figure 3-7. Table 3-1. Commutation Sequence Reference Phase Step Active Phase Discharge Phase Reference Phase efficiency current sensing noise reduction technique illustrated Figure 3-8. figures illustrate phase current DRM030 MOTOROLA System Concept More Information This Product, www.freescale.com Designer Reference Manual System Concept measured (the active phase current inverted compared Figure 3-7), 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. Thus, position estimation resistance evaluation improved well. 3.3.6 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.If power stage designed correctly, ripple amplitude should exceed nominal DC-Bus value. measured DC-Bus voltage needs filtered order eliminate noise. most useful techniques moving average filter that calculates average value from last samples: DCBus DCBus (3-7) order increase precision voltage sensing, voltage drop power switches diodes power stage incorporated into determination actual voltage present motor phase. Designer Reference Manual System Concept More Information This Product, www.freescale.com DRM030 MOTOROLA System Concept Application 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 3-8. Measured 3-Phase Currents with without Noise Correction Implemented DRM030 MOTOROLA System Concept More Information This Product, www.freescale.com Designer Reference Manual System Concept 3.3.7 Power Module Temperature Sensing measured power module temperature used thermal protection hardware realization shown Figure 3-9. 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 (3-8) where: temp power module temperature degrees Celsius Temp_senseis voltage drop diodes which measured diode-dependent conversion constant -0.0073738) diode-dependent conversion constant 2.4596) +3.3V_A 2.2k BAV99LT1 BAV99LT1 100nF Figure 3-9. Temperature Sensor Topology Designer Reference Manual System Concept More Information This Product, www.freescale.com DRM030 MOTOROLA Designer Reference Manual 3-Phase Sensorless Control Section Hardware Contents System Configuration DSP56F805EVM Control Board 4.3.1 DSP56F805EVM Configuration Jumpers. 3-Phase Switched Reluctance 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 4-1): DSP56F805EVM Control Board High Voltage Power Stage Optoisolation Board 3-phase Switched Reluctance Motor DRM030 MOTOROLA Hardware More Information This Product, www.freescale.com Designer Reference Manual Hardware White1 White2 Red1 Red2 Black1 Black2 White Black +12VDC flat ribbon cable flat ribbon cable JP1.1 JP1.2 Designer Reference Manual J11.1 J11.2 Controller Board High Voltage Power Stage Optoisolation Board ECOPT ECHIVSR DSP5680xEVM 240VAC J13.1 J13.3 J13.5 J13.2 J13.4 J13.6 Motor Conn. Table Phase Color Motor-Brake SR40V SG40N UNI-3 Connectors Table Phase Phase Phase White Black ECOPTHIVSR Controller DSP56F803 DSP56F805 DSP56F807 Conn. Encoder Conn. Table Controler Conn. DSP56F803 DSP56F805 DSP56F807 conn. A2510 Figure 4-1. 3-Phase High Voltage Platform Configuration ECMTRHIVSR Hardware More Information This Product, www.freescale.com Hall Sensor Connected Connect Encoder Feedback Encoder DRM030 MOTOROLA Hardware DSP56F805EVM Control Board DSP56F805EVM Control Board DSP56F805EVM facilitates evaluation various features present DSP56F805 part. DSP56F805EVM used develop real-time software hardware products based DSP56F805. DSP56F805EVM provides features necessary user write debug software, demonstrate functionality that software interface with customer's application-specific device(s). DSP56F805EVM flexible enough allow user fully exploit DSP56F805's features optimize performance their product, shown Figure 4-2. DSP56F805 RESET LOGIC RESET 4-Channel 10-bit MODE/IRQ LOGIC MODE/IRQ RS-232 Interface DSub 9-Pin Program Memory 64Kx16-bit Address, Data Control Interface TIMER GPIO Peripheral Expansion Connector(s) Debug LEDs LEDs Over Sense Over Sense Zero Crossing Detect Data Memory 64Kx16-bit Memory Expansion Connector(s) JTAG Connector JTAG/OnCE Primary UNI-3 DSub 25-Pin Parallel JTAG Interface Secondary UNI-3 Freq Crystal XTAL/EXTAL Power Supply 3.3V, 5.0V 3.3VA Figure 4-2. Block Diagram DSP56F805EVM DRM030 MOTOROLA Hardware More Information This Product, www.freescale.com Designer Reference Manual Hardware 4.3.1 DSP56F805EVM Configuration Jumpers Eighteen jumper groups, (JG1-JG18), shown Figure 4-3, used configure various features DSP56F805EVM board. Table describes default jumper group settings. 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 4-3. DSP56F805EVM Jumper Reference Table 4-1. DSP56F805EVM Default Jumper Options Jumper Group Comment input selected high input selected high Primary UNI-3 serial selected Secondary UNI-3 serial selected Enable on-board Parallel JTAG Host Target Interface on-board crystal oscillator input Selects DSP's Mode operation upon exit from reset Jumpers Connections 1-2, 3-4, 1-2, 3-4, Designer Reference Manual Hardware More Information This Product, www.freescale.com DRM030 MOTOROLA Hardware DSP56F805EVM Control Board Table 4-1. DSP56F805EVM Default Jumper Options (Continued) Jumper Group JG10 JG11 JG12 Enable on-board SRAM Enable RS-232 output Secondary UNI-3 Analog Temperature Input unused Host power Host Target Interface Primary Encoder Input Selected Secondary Encoder Input Selected Primary UNI-3 3-Phase Current Sense Selected Analog Inputs Primary UNI-3 Phase Over-Current Selected FAULTA1 Secondary UNI-3 Phase Over-Current Selected FAULTB1 termination unselected on-board crystal oscillator input Comment Jumpers Connections 2-3, 2-3, 2-3, JG13 JG14 JG15 JG16 JG17 JG18 interconnection diagram shown Figure connecting external power supply DSP56F805EVM board. Parallel Extension Cable DSP56F805EVM PC-compatible Computer Connect cable Parallel/Printer port External with 2.1mm, receptacle Power connector Figure 4-4. Connecting DSP56F805EVM Cables Perform following steps connect DSP56F805EVM cables: Connect parallel extension cable Parallel port host DRM030 MOTOROLA Hardware More Information This Product, www.freescale.com Designer Reference Manual Hardware computer. Connect other parallel extension cable shown Figure 4-4, DSP56F805EVM board. This provides connection which allows host computer control board. Make sure that external 4.0A power supply plugged into 120V power source. Connect 2.1mm output power plug from external power supply into shown Figure 4-4, DSP56F805EVM board. Apply power external power supply. green Power-On LED, LED10, will illuminate when power correctly applied. 3-Phase Switched Reluctance 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, 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. Designer Reference Manual Hardware More Information This Product, www.freescale.com DRM030 MOTOROLA Hardware 3-Phase Switched Reluctance High-Voltage Power Stage 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. Figure shows block diagram. 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 4-5. Block Diagram electrical characteristics Table apply operation with 160-Vdc supply voltage. DRM030 MOTOROLA Hardware More Information This Product, www.freescale.com Designer Reference Manual Hardware Table 4-2. Electrical Characteristics 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 Designer Reference Manual Hardware More Information This Product, www.freescale.com DRM030 MOTOROLA Hardware Optoisolation Board 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 4-3. Electrical Characteristics 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 DRM030 MOTOROLA Hardware More Information This Product, www.freescale.com Designer Reference Manual Hardware Motor-Brake Specifications Motor Brake incorporates 3-Phase Motor attached BLDC motor brake. detailed specifications listed Table 4-4. 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 4-6. 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 4-4. Motor Brake Specifications Manufacturer 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 Brno, Czech Republic SR40V (3-Phase Motor) 5000 300V 1.2A SG40N 3-Phase BLDC Motor Baumer Electric 16.05A 1024-12-5 1024 Designer Reference Manual Hardware More Information This Product, www.freescale.com DRM030 MOTOROLA Hardware Hardware Documentation Inductance mechanical angle [deg] Phase Phase Phase Figure 4-6. Inductance Characteristic Hardware Documentation system parts supplied documented according following references: Controller Board DSP56F805: supplied DSP56805EVM described DSP56F803EVMUM/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 DRM030 MOTOROLA Hardware More Information This Product, www.freescale.com 3-Phase High-Voltage Power Stage Designer Reference Manual Hardware supplied with Optoisolation Board ECOPTHIVSR described MEMC3PSRHVPSUM/D Motorola Embedded Motion Control 3-Phase High-Voltage Power Stage User's Manual Optoisolation Board supplied with AC/BLDC High Voltage Power Stage ECOPTHIVACBLDC 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. WARNING: strongly recommended opto-isolation (optocouplers optoisolation amplifiers) during development time avoid electric shock damage development equipment. Designer Reference Manual Hardware More Information This Product, www.freescale.com DRM030 MOTOROLA Designer Reference Manual 3-Phase Sensorless Control Section Software Design Contents Introduction 5.2.1 Data Flow 5.2.2 State Diagram 5.2.3 Software Design Implementation Notes. 5.3.1 Scaling Quantities 5.3.2 Voltage Scaling 5.3.3 Phase Resistance Scaling 5.3.4 Phase Inductance Scaling 5.3.5 Flux Linkage Scaling 5.3.6 Electrical Angle Scaling 5.3.7 Speed Scaling 5.3.8 Duty Cycle Scaling 5.3.9 Velocity Calculation Introduction This section describes design software blocks drive. software will described terms Control algorithm data flow State diagram Software implementation 5.2.1 Data Flow control algorithm closed loop drive described Figure Figure 5-2. based system description. DRM030 MOTOROLA Software Design More Information This Product, www.freescale.com Designer Reference Manual Software Design individual processes described detail following sections. SPEED SETTING Interface 2.nd page omega_required_mech omega_reqPCM_mech time_captured Acceleration Ramp Filter Speed Calculation omega_desired omega_actual Speed Controller 2.nd page 2.nd page I_desired I_active 2.nd page Current Controller &srmCmtData outputDutyCycle 2.nd page Generation Outputs Pwm_AT Pwm_AB Pwm_BT Pwm_BB Pwm_CT Pwm_CB Figure 5-1. System Data Flow Speed Current Control Designer Reference Manual Software Design More Information This Product, www.freescale.com DRM030 MOTOROLA Software Design Introduction DC-Bus Voltage (A/D Converter) 3-PHASE CURRENTS (A/D Converter) &SrmCmtData 1st. page Correction Current omega_actual u_dc_bus i_active i_discharge Commutation Angle Calculation 1st. page theta_commutation outputDutyCycle Reference Flux Linkage Calculation Flux Linkage Estimation psi_T_reference psi_T_active r_phase_actual psi_T_error Flux Linkage Comparator Commutation Resistance Estimation Estimation &srmCmtData time_captured Resistance initialization during motor start 1st. page 1st. page Figure 5-2. System Data Flow Commutation DRM030 MOTOROLA Software Design More Information This Product, www.freescale.com Designer Reference Manual Software Design 5.2.1.1 Acceleration Ramp This process calculates desired speed based required speed according acceleration deceleration ramp. required speed either manually, using push buttons (when manual operational mode), master software (when master software operational mode). 5.2.1.2 Filter Speed Calculation process calculates actual speed motor. calculation based evaluation time between commutation instances. Each time commutation performed, actual time captured. process reads time between sequential commutation events calculates actual motor speed accordingly. software moving average filter applied speed measurement incorporated into process greater noise immunity. actual motor speed calculated average value last four measurements. 5.2.1.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. 5.2.1.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 motor used. Designer Reference Manual Software Design More Information This Product, www.freescale.com DRM030 MOTOROLA Software Design Introduction 5.2.1.5 Generation This process sets on-chip module generation control pulses 3-Phase motor 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. 5.2.1.6 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. Section 3.3.4 Current Voltage Measurement detailed description. 5.2.1.7 Flux Linkage Estimation This process calculates actual flux linkage. calculation active flux linkage started with each commutation phases. Flux linkage error captured current pulse further used phase resistance estimation (see Section 3.3.3 Section 2.3.2). 5.2.1.8 Commutation Angle Calculation This process calculates commutation angle according actual speed, DC-Bus voltage, desired current (see Section 3.3.3). DRM030 MOTOROLA Software Design More Information This Product, www.freescale.com Designer Reference Manual Software Design 5.2.1.9 Reference Flux Linkage Calculation This process calculates reference flux linkage according stored characteristic (iphase) aligned position. process requires commutation angle actual phase current determination reference flux linkage (see Section 3.3.3). 5.2.1.10 Flux Linkage Comparator Commutation This process compares reference flux linkage active flux linkage determine commutation events. When actual flux linkage exceeds reference, commutation performed (see Section 3.3.3). Also, actual time captured used actual speed calculation. 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. This control technique requires preparation output control register. calculation OUTCTLx OUTx bits output control register, dedicated commutation algorithm, 3-Phase Designer Reference Manual Software Design More Information This Product, www.freescale.com DRM030 MOTOROLA Software Design Introduction 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. 5.2.1.11 Resistance Estimation This process evaluates flux linkage estimation error phase current stroke estimates actual phase resistance (see Section 3.3.3). 5.2.2 State Diagram processes described above implemented single state machine, illustrated Figure state machine provides transition among 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 DRM030 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 switchState Stop appOpMode change FAULT State STOP State appFault NO_FAULT switchState appFault NO_FAULT switchState Stop appFault NO_FAULT appFault NO_FAULT State Figure 5-3. Application State Diagram 5.2.2.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 start after reset Start/Stop switch accidentally START position). Designer Reference Manual Software Design More Information This Product, www.freescale.com DRM030 MOTOROLA Software Design Introduction 5.2.2.2 Application State STOP STOP state entered either from INIT state from state. STOP state, drive enabled application waits START command. When application STOP state, operational mode changed either from MANUAL mode master software mode vice versa. When operational 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. 5.2.2.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. 5.2.2.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. 5.2.3 Software Design general software diagram incorporates: Main routine entered from Reset, Interrupt Service Routines (ISR). diagram illustrated Figure 5-4. DRM030 MOTOROLA Software Design More Information This Product, www.freescale.com Designer Reference Manual Software Design After Reset, Main routine provides board identification, initialization DSP, initialization application, then enters infinite 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 Resistance Estimator Designer Reference Manual Software Design More Information This Product, www.freescale.com DRM030 MOTOROLA Software Design Introduction Interrupt Service Routines Conversion Completed Interrupt RESET Interrupt Handlers done Initialize Application done Background Tasks Fault Interrupt Fault Detection Fault Interrupt Handler done Interrupt Application State Machine done Interrupt Handler done timeout Timeout Timeout done done Timeout Timeout done IRQ0, IRQ1 Interrupt Timeout Push Buttons Interrupt Handlers done Figure 5-4. Software Design General Overview DRM030 MOTOROLA Software Design More Information This Product, www.freescale.com Designer Reference Manual Software Design 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 fault services master software communication Push Button services Push Button Push Button Down services Down Push Button 5.2.3.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: 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 Designer Reference Manual Software Design More Information This Product, www.freescale.com DRM030 MOTOROLA Software Design Introduction 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 Quad Timer on-chip module (speed measurement) count Prescaler Initialize Quad Timer on-chip module (position reference visualization using master software) count Quadrature Decoder input count repeatedly Initialize Quadrature Decoder on-chip module (position reference master software) digital filter input signals connect Quadrature Decoder signals Quad TimerA1 Initialize brake driver Initialize driver Initialize push buttons push buttons interrupts IRQ0, IRQ1 Initialize switch driver switch driver used DSP56F805EVM Application initialization: DRM030 MOTOROLA Software Design More Information This Product, www.freescale.com individual application parameters their initial values Designer Reference Manual Software Design Start conversion Measure offset individual current sensors Measure DC-Bus voltage temperature Calculate application parameters according DC-Bus voltage Initialize Quad Timer driver (ADC-PWM Synchronization) synchronization delay enable Quad Timer started first SYNC driver initialization synchronization enable 8-sample conversion 5.2.3.2 Fault Detection Initialize variables motor start-up according start-up phase Enable interrupts Fault Detection routinely checks application faults. fault occurs, disables outputs sets application FAULT status. Note that case over-current over-voltage faults, outputs disabled directly internal module fault protection (see Section 5.2.3.7). 5.2.3.3 Application State Machine Application State Machine provides transition between individual states application: INIT, STOP, RUN, FAULT. reference, Section 5.2.2. 5.2.3.4 Scheduler Timeout This routine accessed from main scheduler period Timeout msec). following tasks then performed: Designer Reference Manual Software Design More Information This Product, www.freescale.com Push button filter debounces push button switching noise DRM030 MOTOROLA Software Design Introduction Start/Stop switch filter debounces Start/Stop switch noise According operational mode, desired speed calculated manual mode according push buttons master software control mode, according master command Start-up routine performed required start-up switching pattern generated. detailed description refer Section 3.3.2. Speed command calculated using acceleration deceleration ramp using desired speed setup controlled according state drive. indicate STOP state, state FAULT state. 5.2.3.5 Scheduler Timeout This state accessed 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. Resistance estimator estimates phase resistance according flux linkage estimation error 5.2.3.6 Conversion Completed Conversion Completed most critical routine most demanding processor's 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, voltage temperature once. When conversion finalized, Completed called. routine provides following services calculations: DRM030 MOTOROLA Software Design More Information This Product, www.freescale.com Designer Reference Manual Software Design Reads time speed calculation reference Reads conversion results (phase currents, DC-Bus voltage, temperature) Calculates offsets phase currents Calculates reference actual flux linkage determines commutation Current controller calculates output duty cycle according desired actual phase currents Provides commutation when required Provides speed measurement Records selected recorder variables master software) Loads registers Calculates references software timers Timer1 Timer2 Enables next synchronization trigger 5.2.3.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. 5.2.3.8 This interrupt handler provides communication master software service routines. These routines fully independent motor control tasks. Designer Reference Manual Software Design More Information This Product, www.freescale.com DRM030 MOTOROLA Software Design Implementation Notes 5.2.3.9 Push Button UP/Down Push Button Interrupt Handlers take care push button 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. Implementation Notes 5.3.1 Scaling Quantities motor control application uses fractional representation real quantities except time. N-bit signed fractional format represented using 1.[N-1] format sign bit, fractional bits). Signed fractional numbers (SF) following range: +1.0 (5-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 (5-2) where: Fractional Value fractional representation real value [Frac16] Real Value real value quantity RPM, etc.] Real quantity range maximal range quantity, defined application RPM, etc.] DRM030 MOTOROLA Software Design More Information This Product, www.freescale.com Designer Reference Manual Software Design 5.3.2 Voltage Scaling application voltages scaled maximal measured voltage. DC-Bus voltage scaling equation following: DC_BUS u_dc_bus (5-3) Where: u_dc_bus scaled variable DC-Bus voltage [Frac16] VDC_BUS measured DC-Bus voltage VMAX maximal measurable DC-Bus voltage application, VMAX 407V high voltage platform. other application voltage variables scaled same (active phase voltage u_active, discharge phase voltage u_discharge, DC-Bus under-voltage limit, start-up voltage). 5.3.3 Phase Resistance Scaling There general scaling resistance. order decrease calculation requirements, application phase resistance scaled according scaling measured voltage phase current. actual phase resistance, scaling equation following: phase_actual r_phase_actual phase_max (5-4) Where: r_phase_actual scaled variable actual phase resistance [Frac16] Rphase_actual measured actual phase resistance Designer Reference Manual Software Design More Information This Product, www.freescale.com DRM030 MOTOROLA Software Design Implementation Notes uMAX maximal measurable DC-Bus voltage iphase_max maximal measurable phase current application, uMAX/iphase_max 407V/5.86A 69.4 other application resistance variables scaled same (resistance sample, r_phase_sample). 5.3.4 Phase Inductance Scaling There general scaling inductance. order decrease calculation requirements, application phase inductance scaled according scaling measured voltage phase current. unaligned phase inductance, scaling equation following: unaligned L_unaligned phase_max (5-5) Where: L_unaligned inductance [Frac16] scaled variable unaligned phase Lunaligned unaligned phase inductance uMAX max. measurable DC-Bus voltage iphase_max max. measurable phase current application, uMAX iphase_max 407V/5.86A 69.4V/. 5.3.5 Flux Linkage Scaling application phase linkage calculated flux linkage divided sampling period (2-6). 16-bit phase flux increments (uk-rk*ik) summed 32-bit flux linkage variable (N/T). integration output overflow more than 65,536 samples calculated. DRM030 MOTOROLA Software Design More Information This Product, www.freescale.com Designer Reference Manual Software Design sampling period defined frequency 16kHz. application: 1/16000 62.5*10-6sec. 32-bit flux linkage, psi_T_active_sum, further scaled 16-bit variable psi_T_active. psi_T_active psi_T_active_sum (5-6) Where: psi_T_active scaled variable active flux linkage [Frac16] psi_T_active_sum scaled variable active flux linkage [Frac32]. other application 16-bit flux linkage variables scaled same (flux linkage error, psi_T_error, reference flux linkage, psi_T_reference, delta flux linkage, psi_T_delta) 5.3.6 Electrical Angle Scaling application electrical angle scaled electrical angle aligned position (see Figure 5-5). electrical commutation angle scaling equation following: commutation_el theta_commutation_el (5-7) Where: theta_commutation_el scaled variable electrical commutation angle [Frac16] commutation_el desired commutation angle [oel] application, aligned_el 180oel other application electrical angle variables scaled same (delta theta required phase current reach desired current, theta_delta_el, theta where stator rotor poles start overlap, theta_start_to_overlap_el). Designer Reference Manual Software Design More Information This Product, www.freescale.com DRM030 MOTOROLA Software Design Implementation Notes start_to_overlap -180 aligned position Figure 5-5. Electrical Angle Definition 5.3.7 Speed Scaling Speed scaled maximal speed drive. desired start-up speed, scaling equation following: start_up omega_desired_startup (5-8) 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, omega_reqMAX_mech omega_reqMIN_mech, push button speed increment, omega_increment_pb). DRM030 MOTOROLA Software Design More Information This Product, www.freescale.com Designer Reference Manual Software Design 5.3.8 Duty Cycle Scaling duty cycle scaled maximal duty cycle drive. output duty cycle, scaling equation following: duty_cycle output output_duty_cycle -duty_cycle (5-9) Where: output_duty_cycle scaled variable output duty cycle [Frac16] duty_cucleoutput desired output duty cycle duty_cycleMAX max. applicable duty cycle application, duty_cycleMAX 100% other application duty cycles scaled same (high duty cycle limits speed controller, start output duty cycle outputDutyCycleStartup). 5.3.9 Velocity Calculation actual speed motor calculated from time, TimeCaptured, captured on-chip Quad Timer between following edges position Hall sensors. actual speed, OmegaActual calculated according following equation: SpeedCalcConst OmegaActual -TimeCaptured (5-10) where: OmegaActual actual speed [RPM] TimeCaptured time, terms number timer pulses, captured between edges position sensor SpeedCalcConst constant defining relationship between actual speed number captured pulses between edges position sensor Designer Reference Manual Software Design More Information This Product, www.freescale.com DRM030 MOTOROLA Software Design Implementation Notes constant SpeedCalcConst calculated SpeedMin SpeedCalcConst -SpeedMax (5-11) where: SpeedMin minimal measured speed [RPM] SpeedMax maximal measured speed [RPM] Minimal measured speed, SpeedMin, given configuration sensors parameters on-chip timer used speed measurement. calculated NoPulsesPerRev SpeedMin Presc BusClockFreq (5-12) where: NoPulsesPerRev number sensed pulses position sensor single revolution Presc prescaler Quad Timer used speed measurements BusClockFreq Clock Frequency [Hz] Maximal measured speed, SpeedMax, selected SpeedMax SpeedMin (5-13) where: integer constant greater than Then speed calculation constant determined SpeedCalcConst BusClockFreq -NoPulsesPerRev Presc SpeedMax (5-14) application: NoPulsesPerRev Hall sensor pulses revolution motor Presc DRM030 MOTOROLA Software Design More Information This Product, www.freescale.com Designer Reference Manual Software Design BusClockFreq 36*106 SpeedMax 3000 Then, SpeedCalcConst [rev-1] Designer Reference Manual Software Design More Information This Product, www.freescale.com DRM030 MOTOROLA Designer Reference Manual 3-Phase Sensorless Control Section Application Setup Contents Introduction Application Outline Application Description Application Set-Up 6.3.1 DSP56F805EVM Set-Up Projects Files .110 Application Build Execute Application Description 3-Phase Sensorless Motor Control Application demonstrates sensorless Switched Reluctance Motor Control application using flux linkage position estimation DSP56F805 processor. estimation phase resistance speed range included. Control Process After RESET, drive enters INIT state manual mode.When RUN/STOP switch detected STOP position (using RUN/STOP Switch master software command) there faults pending, STOP application state entered. When start command detected (using RUN/STOP switch master software Start button), drive enters application state; motor started. following start-up sequence with rotor alignment provided: MOTOR_STOPPED Motor stopped DRM030 MOTOROLA Application Setup More Information This Product, www.freescale.com Designer Reference Manual Application Setup ALIGNMENT_COMMAND Alignment command accepted ALIGNMENT_STAGE_ONE Alignment progress; phases switched ALIGNMENT_STAGE_TWO Alignment progress; phase switched START_UP_COMMAND Alignment finalized; start motor START_UP_FINISHEDMotor running; start-up finalized rotor position evaluated using sensorless flux linkage estimation algorithm. actual flux linkage calculated using frequency rate compared with reference flux linkage given commutation angle. commutation angle calculated according desired speed, current actual voltage. When actual flux linkage exceeds reference flux linkage, commutation phases desired rotation direction done. flux linkage error used phase resistance estimation speeds Patent Pending). commutation instances used actual motor speed calculation. According control signals (RUN/STOP switch, UP/DOWN push buttons) master software commands (during master software 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 with duty cycle percent Output_duty_cycle_startup during motor start-up). Then during each cycle, actual phase current compared with desired current. soon actual current exceeds command current, current controller turned procedure repeated each commutation cycle motor. current controller generates desired duty cycle. Finally, 3-phase Motor Control signals generated. Drive Protection voltage, current power stage temperature measured during control process. They protect drive from Overvoltage, Undervoltage, Overcurrent Overheating. Undervoltage Overheating protection performed software, Designer Reference Manual Application Setup More Information This Product, www.freescale.com DRM030 MOTOROLA Application Setup Application Description while Overcurrent Overvoltage fault signal utilizes fault input DSP. power stage identified using board identification. correct power stage identified, fault "Wrong Power Stage" disables drive operation. Line voltage measured during application initialization application automatically adjusts itself either depending measured value. line voltage detected -15% +10% nominal voltage, fault "Out Mains Limit" disables drive operation. above-mentioned faults occur, motor control outputs disabled order protect drive application enters FAULT state. FAULT state left only when fault conditions disappear RUN/STOP switch moved STOP position application External Flash 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 6-1). actual state application indicated user LEDs (see Figure 6-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. DRM030 MOTOROLA Application Setup More Information This Product, www.freescale.com Designer Reference Manual Application Setup Figure 6-1. RUN/STOP Switch UP/DOWN Buttons Figure 6-2. USER LEDs DSP56F805EVM Designer Reference Manual Application Setup More Information This Product, www.freescale.com DRM030 MOTOROLA Application Setup Application Description Table 6-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 DRM030 MOTOROLA Application Setup More Information This Product, www.freescale.com Designer Reference Manual Application Setup Speed Scope monitors: Required Speed Actual Speed Desired Phase Current Start-up Recorder captures: Desired Phase Current Active Phase Current Reference Flux Linkage Active Flux Linkage Output Duty Cycle Encoder Position Reference Start-up Recorder initiated with motor start only. Flux Linkage Recorder captures: Active Phase Current Discharge Phase Current Active Flux Linkage Discharge Flux Linkage Reference Flux Linkage Encoder Position Reference Flux Linkage Recorder initiated time during motor run. Current Controller Recorder captures: Desired Phase Current Active Phase Current Output Duty Cycle Encoder Position Reference Designer Reference Manual Application Setup More Information This Product, www.freescale.com DRM030 MOTOROLA Application Setup Application Description Current Controller Recorder initiated time during motor run. recorder used only when application running from External limited on-chip memory. length recorded window "Recorder Properties" bookmark "Main" "Recorded Samples". limited dedicated memory space appconfig.h file. recorder samples taken every 64.5 µsec. Start master software window's application, 3ph_srm_sensorless_sa.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. DRM030 MOTOROLA Application Setup More Information This Product, www.freescale.com Designer Reference Manual Application Setup Figure 6-3. Master Software Control Window Application Set-Up 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. Designer Reference Manual Application Setup More Information This Product, www.freescale.com DRM030 MOTOROLA Application Setup Application Set-Up Figure 6-4. Set-up 3-Phase Motor Control Application 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 DRM030 MOTOROLA Application Setup More Information This Product, www.freescale.com Designer Reference Manual Application Setup Optoisolation Board ECOPT DSP56F805 Evaluation Module, supplied DSP56F805EVM serial cable needed master software debugging tool only. parallel cable needed Metrowerks Code Warrior debugging loading. correct order phases (phase phase phase motor phase white wire phase wire phase black wire When facing motor shaft, motor shaft should rotate clockwise (i.e., positive direction, positive speed). detailed information, refer dedicated application note (see References). 6.3.1 DSP56F805EVM Set-Up execute 3-Phase Sensorless Motor Control, DSP56F805EVM board requires strap settings shown Figure Table 6-2. Designer Reference Manual Application Setup More Information This Product, www.freescale.com DRM030 MOTOROLA Application Setup Application Set-Up JG10 USER JG14 JG14 JG12 JG13 JG12 JG13 JG15 JG10 JG17 DSP56F805EVM JG18 JTAG JG16 JG15 JG16 RUN/STOP JG11 LED3 IRQA IRQB RESET JG18 JG17 JG11 Figure 6-5. DSP56F805EVM Jumper Reference Table 6-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, DRM030 MOTOROLA Application Setup More Information This Product, www.freescale.com Designer Reference Manual Application Setup Table 6-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. Projects Files 3-Phase Sensorless Motor Control application composed following files: main program application project file application configuration file linker command file external linker command file Flash DRM030 Application Setup More Information This Product, www.freescale.com MOTOROLA Designer Reference Manual Application Setup Projects Files 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 This application runs stand-alone, i.e. needed files concentrated project folder. Quick_Start libraries are: folder general C-header files folder device specific source files, e.g. drivers folder master software source files folder algorithms folder board identification function source file DRM030 MOTOROLA Application Setup More Information This Product, www.freescale.com Designer Reference Manual Application Setup Application Build Execute When building 3-Phase Sensorless Motor Control Application, user create application that runs from internal Flash External RAM. select type application build, open 3srm_hall_sa.mcp project select target build type, shown Figure 6-6. definition projects associated with these target build types viewed under Targets project window. Figure 6-6. Target Build Selection project built executing Make command, shown Figure 6-7. This will build link 3-Phase Sensorless Motor Control Application needed Metrowerks Quick_Start libraries. Designer Reference Manual Application Setup More Information This Product, www.freescale.com DRM030 MOTOROLA Application Setup Application Build Execute Figure 6-7. Execute Make Command execute 3-Phase Sensorless 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 generated during Build. External target selected, executable will loaded off-chip RAM. Once Flash been programmed with executable, target system stand-alone mode from Flash. this, jumper configuration disable parallel port, press RESET button. Once application running, move RUN/STOP switch position required speed using UP/DOWN push buttons. Pressing UP/DOWN buttons should incrementally increase motor speed until reaches maximum speed. successful, motor will spinning. DRM030 MOTOROLA Application Setup More Information This Product, www.freescale.com Designer Reference Manual Application Setup NOTE: RUN/STOP switch position when application starts, toggle RUN/STOP switch between STOP positions enable motor spinning. This protection feature that prevents motor from starting when application executed from CodeWarrior. should also lighted green LED, which indicates that application running. application stopped, green will blink frequency. Undervoltage fault occurs, green will blink frequency 8Hz. Designer Reference Manual Application Setup More Information This Product, www.freescale.com DRM030 MOTOROLA Designer Reference Manual 3-Phase Sensorless Control Appendix References Chalupa, Pohon spinanym reluktancnim motorem, Master's Thesis, FEI-VUT BRNO, UPVE, 1994 Chalupa, Visinka, On-Fly Phase Resistance Estimation Switched Reluctance Motor Sensorless based Control Techniques, Conference Power Conversion Intelligent Motion, Nurnberg, PCIM, 2000 Motorola, Apparatus Method Estimating Coil Resistance Electric Motor, Chalupa, Visinka, Patent, 6,366,865, 2002-04-02 Gallegos-Lopez, Sensorless Low-Cost Me Other recent searchesXC4000E - XC4000E XC4000E Datasheet V23818-C18-U37 - V23818-C18-U37 V23818-C18-U37 Datasheet SP8782A - SP8782A SP8782A Datasheet DS3651 - DS3651 DS3651 Datasheet SBGA168W090 - SBGA168W090 SBGA168W090 Datasheet ICS83210 - ICS83210 ICS83210 Datasheet EMP212-Q5 - EMP212-Q5 EMP212-Q5 Datasheet DTC143TUA - DTC143TUA DTC143TUA Datasheet AQS210PS - AQS210PS AQS210PS Datasheet
Privacy Policy | Disclaimer |