Sensorless Vector Control and Implementation: Why and How Renesas Electronics America Inc.
Renesas Technology & Solution Portfolio 2
Microcontroller and Microprocessor Line-up 2010 2013 32-bit 8/16-bit 1200 DMIPS, Superscalar Automotive & Industrial, 65nm 600µA/MHz, 1.5µA standby 500 DMIPS, Low Power Automotive & Industrial, 90nm 600µA/MHz, 1.5µA standby 165 DMIPS, FPU, DSC Industrial, 90nm 242µA/MHz, 0.2µA standby 25 DMIPS, Low Power Industrial & Automotive, 150nm 190µA/MHz, 0.3µA standby 10 DMIPS, Capacitive Touch Wide Industrial Format & LCDs Automotive, 130nm 350µA/MHz, 1µA standby 1200 DMIPS, Performance Automotive, 40nm 500µA/MHz, 35µA deep standby 165 DMIPS, FPU, DSC Industrial, 40nm 242µA/MHz, 0.2µA standby Embedded Security, ASSP Industrial, 90nm 1mA/MHz, 100µA standby 44 DMIPS, True Low Power Industrial & Automotive, 130nm 144µA/MHz, 0.2µA standby 3
Enabling The Smart Society Challenge: Sensorless vector control increases the energy efficiency of motor control systems that drive the smart society. However, understanding and implementing sensorless vector control is a herculean task. MCU Solution: This class will help you understand key challenges associated with sensorless vector control and how to implement it using Renesas microcontrollers 4
Agenda Need for vector control Theory behind vector control Challenges in implementing sensorless vector control RX62T MCU family for sensorless vector control Renesas motor control solutions 5
Macro Factors Driving Need for Energy Efficiency Global Environmental Concerns Energy Efficiency Policies New Initiatives 6
Realizing Energy Efficiency in Motor Control Industrial 44% Residential 26% Others 30% Motors (45%) Energy Efficient Motors Motor Design Motor Type Electronic Control Variable speed drives Vector control Direct torque control Power factor correction 15% 20% Up to ~30% savings 7
Sensorless Vector Control Theory 8
Permanent Magnet AC Motor Complex Control Sinusoidal stator current produces rotating field Rotor mounted magnetic field is rotating Γ = k. λ s λr Maintain stator field orthogonal to rotor field A C X B A B C B X θ X C A 9
Vector Control Challenge Maintain orthogonality Error correction feedback loop In-phase current = 0 Orthogonal current set per torque requirements What parameters to adjust Voltage magnitude (PWM duty cycle) Need to transform current vectors to rotor frame Stator Field 90 0 ω r Rotor Field 10
Reference Frame Transformation Vector control advantages Maximizing torque (efficiency) Independent control of flux and torque Snappy torque control for load variation Three-phase Stator i u 2-phase Rotor Frame i q 0 120 i w i v Mapping i d 11
Current Transformation to 2-ph Rotor Frame Step 1 : 3-ph to 2-ph conversion Step 2 : 2-ph stationary frame to 2-ph rotor frame (rotating) Rotor position (θ) needed uvw stationary frame αβ stationary frame dq rotatory frame i u ω F i α ω F I d q- axis ω F I q i w iv i β d-axis i i α β = 1 0 1 2 3 2 1 i 2 i 3 i 2 a b c Clarke Transformation Park Transformation I I d q cosθ = sinθ sinθ i cosθ i α β 12
Sensorless Vector Control Lower cost but more complex implementation Current and motor parameters to estimate rotor position Increased reliability Reduced cost of sensor ($3-$20) Less physical space needed Need to estimate θ without sensors Motor ω* ω PI Controller i* i PI Controller PWM Generation i θ Speed /position sensor Speed Calculation Position Estimation 13
Motor Model in αβ Frame v v dλ dt dλ α α = Rsiα + α r α β Voltage Equation Flux Linkage = R i s β + dt β λ λ β = Λ m cosθ + Li = Λ m sinθ + r Li β Λ cosθ m r = λ α Li α =0 Λ sinθ m r = λ β Li =0 β Λ m θ r is the rotor flux linked is the rotor position Potential Inaccuracy: If full load or large motor 14
Rotor Position and Speed Estimation Λm cos θ r = λα Λm sinθ r = λ β θ = r λ arctan( λ β α ) ω = dθ dt Bottleneck: arctan implementation takes several CPU cycles 15
Renesas Flux Observer Model v α = R i +, β α, β s d λ α, β dt λ λ α α = + t ( v R i 0 α s α 0 e α ) dt Potential inaccuracy: Noise in measuring current and voltage Potential inaccuracy: Effect of temperature on resistance 16
Flux Observer Implementation Cascaded low pass filters rather than direct integration First low pass filter Derivative Second low pass filter Negate the effect of DC offset in measured current/voltage Low pass filter e α,β y 1023 1024 n = yn 1 + e α,β y n d n Derivative d dt = yn yn 1 Low pass filter d n λ α, β ( n) 1023 λ α, β ( n) λ 1024 = α, β ( n 1) + d n 17
Sensorless Vector Control Loop DC BUS Park -1 Clarke -1 ω*r ωr Speed Regulator id*=0 Iq* iq Regulator id Regulator dq To αβ vα vβ αβ to abc Sine PWM 6 3-ph Inverter id iq θ Flux and Position Observer αβ to dq Park iα iβ θ abc to αβ Clarke ia ib Speed Estimation 18
Implementation Challenges 19
Implementation Challenges Requirements MCU Considerations 1. Computation intensive routines High performance CPU, FPU 2. Multiple current/voltage measurement 12Bit Simultaneous Sampling ADC 3. Robust performance Noise immunity, PWM shut off 4. Cost effective design On-chip analog, data flash, dual motor 20
1. Computation Intensive Clarke/Park Transformations Flux Estimation Rotor position and speed High-performance RX600 Core 100MHz CPU 1-cycle flash access 32x32 H/W multiplier 32/32 H/W divider 32bit Barrel Shifter Floating point unit 21
Floating Point Unit Advantages Performance Wide range and high resolution No scaling, overflow or saturation Reduced code size Ease of Use Ease of coding, reading, debugging Compatible with the C/Matlab simulation code 22
Floating Point : Range and Resolution Fixed Point Q11.21 Single Precision Floating Point..0.. Resolution 2-21 10-7..0.. Resolution 10-39 -2 10 Range +2 10-10 3 +10 3-10 38 Range +10 38 or 23
Fixed-point Calculations Requires Scaling X(n) = X(n-1) + A1 * E(n) (32b,Q14.18) (16b, Q12.4) (16b, Q8.8) MULT (32b,Q20.12) SHIFT (32b,Q14.18) (32b,Q14.18) 24
No Scaling Needed Fixed-Point Implementation FPU Implementation SHIFT 25
No Saturation Check Fixed-Point Implementation Check for Saturation 26
Reduced Code Size FPU instructions make code and the execution time smaller Fixed-Point Implementation FPU Implementation 27
Readability Fixed-Point Implementation FPU Implementation Parameters Parameters Park Transformation Code Park Transformation Code 28
FPU Brings Ease of Simulation Inherently floating point Simulation Platform Time-consuming Unidirectional Portable to FPU Bidirectional Fixed Point Algorithm Floating Point Algorithm Fixed Point CPU Floating Point CPU 29
FPU Implementations Traditional FPU Renesas RX FPU General Registers General Registers Dedicated Data Registers Load/Store No Load/Store Instructions Floating- Point Unit Floating- Point Unit 30
2. Accurate Analog Signal Measurement Estimates based on current and voltage Integration for flux estimation Multiple simultaneous measurements Simultaneous sampling ADC Oversampling current waveform Filtering to mitigate noise Dual registers for 1-shunt U V W 4 ADC Samples 5us 50us 31
Current Measurement Techniques 3-shunt 1-shunt 1-Shunt Advantages Cost reduction (Res, PGA) No need for 3-ph calibration Reliability 1-shunt Challenges ADC samples twice quickly Reconstruction of current U V W I W,V,U I W I W +I V 32
Support for 3-shunt and 1-shunt Detection 12-bit ADCs with 1us conversion time Double register for 2 samples 3S/H for one-shot sampling of three phase currents Self-diagnostic capability for UL/IEC safety requirements ADC Set 1 AN0 PGA 3 S/H for 3 shunt current detection S/H Double register for 1-shunt ch0 Register 1 Register 2 AN1 AN2 AN03/CVref L PGA PGA External Reference S/H S/H Multiplexer S/H A/D Register CH1 Register CH2 Register CH3 Window Comparators CPU Interrupt PWM Shut off (POE) 33
3. Robust Performance Susceptibility to noise Hardware shut off Noise immune MCU design Careful power/ground layout Pin noise filtering 5V option On-chip hardware POE circuit Fast window comparators 34
4. Cost Effectiveness On-chip integration Scalability Complete solution for driving two 3-ph motors 6 programmable gain amplifiers 6 window comparators 2 x 3ph cpwm timers 2 x quadrature encoder inputs 32-512KB Scalability 63TH Data flash Scalability RX6xT package, ROM RX200 - performance 63TL 62T 48-144 pins 35
Implementing Sensorless Vector Control Using RX62T 36
RX62T Motor Timer Set (MTU3) 100MHz, 16bit Timers Protection Features PWM shut down (Ext, Comparator, Clock) Mode registers inaccessible during operation ch0 ch1 ch2 ch3 ch4 Quadrature Encoder1 A,B,Z Quadrature Encoder2 A,B,Z 3-phase cpwm O/P U,V,W ch5 3 Input Captures ch6 ch7 MTU3 3-phase cpwm O/P U,V,W 37
Hardware Implementation RX62T MTU CH3/4 PWM Generation 6 Gate Driver PWM Shut Off 3-phase inverter 3 RX600 CORE Comparator 3 x3 12-bit ADC 3-phase BLDC Motor Analog Unit 0 S/H PGA Motor Current 38
Software Implementation Initialization PWM Interrupt V BUS /Current Measurement Current Reconstruction (u,v,w) -> (α,β) ->(d,q) Actual Current Last θ Reference Current Last ω & Reference ω Speed PI Current PI Voltage (d,q) New Speed Estimation New θ Estimation V(u,v,w) -> PWM Duty (d,q) -> (α,β) (u,v,w) <- Last θ 39
Fixed point vs. FPU Comparison Algorithm: Sensor less Vector Control with 1-Shunt Current Detection PWM Carrier Frequency: 20kHz Current Loop: 10kHz RX62T Starter Kit Renesas Inverter Board 40
CPU Bandwidth Usage Look-up Table Floating Point Fixed point Sine,Cosine,Atan Functions 0% 5% 10% 15% 20% 25% 30% 35% 40% CPU BW 41
CPU Bandwidth Usage Floating-point code 40% faster Overall Current Measurement Position Estimation Clarke and Park Floating Point Fixed point PI Loop 0 10 20 30 40 us 42
Code Size Floating-point code size is 45% lower Current Measurement Position Estimation Clarke and Park Floating Point Fixed point PI Loop 0 50 100 150 200 250 B 43
Driving Two 3-Phase BLDC Motors Sensorless Vector Control Floating point math CPU BW used <50% www.renesas.com/rxmotorkit Motor #2 Motor #1 External Inverter RX600 Motor Kit 44
Implementation for Two Motor Control Software Implementation Control loop executed at Timer underflow interrupt Both interrupts at same priority level Alternate Implementations Control loops at different rates Interrupt at overflow/underflow MTU.CH3/4 10KHz MTU.CH3/4 10KHz MTU.CH6/7 10KHz MTU.CH6/7 20KHz CPU Available Control Loop 1 Control Loop 2 Control Loop 1 Control Loop 2 45
Software Implementation Initialization PWM Interrupt PWM Interrupt2 V BUS /Current Measurement Current Reconstruction Reference Current (u,v,w) -> (α,β) ->(d,q) Actual Current Last θ Last ω & Reference ω Speed PI Current PI Voltage (d,q) New Speed Estimation New θ Estimation V(u,v,w) -> PWM Duty (d,q) -> (α,β) (u,v,w) <- Last θ 46
Performance Comparison with a High-end DSP RX62T offers tremendous value Comparable performance Significantly lower cost System Cost +50% Code size 7.8KB 7.4KB High-end DSP RX62T Loop execution 16us 18us 47
Response to Step Change in Load 1050 1040 1030 1020 High-end DSP 1010 Speed (rpm) 1000 990 RX62T 980 970 960 950 0.265 6.343 22.906 time 48
Renesas Motor Control Solutions 49
Motor Control MCUs Performance RX62T 100MHz, 165DMIPs 64KB 256KB RX63TL 100MHz, 165DMIPs 32KB 64KB RX63TH 100MHz, 165DMIPs 256KB 512KB RX Core RX600 Family -Dual motor vector control -Floating point -RX600 Motor Kit RX220 32MHz,50DMIPs 32KB-256KB RX200 Family -Single motor vector control -Entry level RX core RL78/G14 32MHz, 44DMIPs 32KB 256KB R8C/3xM 20MHz 8KB 128KB Oct.2012 RL78/G14 -Scalar control (low-end vector control) -RL78 Motor Kit Timeline 50
Evaluation Kits for Vector Control Extensive Code Support Flexibility to Evaluate and Develop GUI External Inverter Connector RX600 Motor Kit RL78 Motor Kit 51
High Voltage Demo Platform (2KW) Line AC 85-265V AC to DC rectifier Interleaved PFC IGBTs RJH60D5DPQ-A0 LCD PWM Set RPM RPM Is Iq Vdc CPU Board Gate Driver Current Sense Hall and Encoder Potentiometer and Push Buttons In-circuit Scope 52
2KW Inverter Platform 53
Summary Sensorless vector control improves the motor system efficiency Implementing sensorless vector control requires careful selection of MCU Renesas provides several motor control MCUs depending on the application requirements RX600 and RL78 motor control kits are available for an easy evaluation of Renesas solutions High voltage platforms are also available 54
Questions? 55
Enabling The Smart Society Challenge: Sensorless vector control increases the energy efficiency of motor control systems that drive the smart society. However, understanding and implementing sensorless vector control is a herculean task MCU We discussed key challenges associated with sensorless vector control and how to implement it using Renesas microcontrollers Do you agree that we accomplished the above statement? 56
Renesas Electronics America Inc.