Digital Motion Control System Design - From the Ground Up.
-
Upload
gunnar-hutton -
Category
Documents
-
view
217 -
download
1
Transcript of Digital Motion Control System Design - From the Ground Up.
![Page 1: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/1.jpg)
Digital Motion Control System Design - From the Ground Up
![Page 2: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/2.jpg)
Introduction
• Break Motion Control Design into three parts– Digital Hardware Design– Power Hardware Design– Software Design
• Introduce D3 Engineering’s Motor Control Development Kit
![Page 3: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/3.jpg)
Control Hardware• Choose Feedback Method• Choose Communications interface• Isolation requirements
– Isolation between control and power electronics– Isolation between control electronics and outside world
• Digital I/O• Analog I/O• Pulse Width Modulation (PWM)• Putting it all together
![Page 4: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/4.jpg)
Feedback
• Incremental or Absolute• Resolution requirements• Environmental considerations
![Page 5: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/5.jpg)
Incremental Optical Encoder
• Code disk with optical transmitter and receiver on either side
• Outputs two quadrature signals, A and B, and an index pulse
• Multiple options for output configuration
– Open collector– Differential Line Driver– 5V-24V
• Each edge is counted giving 4x resolution
• Commutation tracks also available• Available in high resolution (>100K
counts per rev)• Easy to interface, no analog
hardware
![Page 6: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/6.jpg)
Incremental Optical Encoder
• Standard products not typically good for harsh environments
• No absolute position data
![Page 7: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/7.jpg)
Resolver
• A rotating transformer• Input – AC excitation• Output – Sin and Cos
of rotor angle modulated at excitation frequency
![Page 8: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/8.jpg)
Resolver
• Typically considered rugged, good for harsh environments
• Absolute within 1 revolution
![Page 9: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/9.jpg)
Resolver
• Requires Resolver to Digital Converter (RDC)– Separate ASIC– Implement in DSP
• Requires careful analog design
• Resolution is a function of RDC
![Page 10: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/10.jpg)
Absolute Encoder
• Serial or Parallel interface– Typically up to 17-bit single turn resolution
• Absolute over single or multiple revolutions– 12-bit multi-turn resolution typical
• Available user memory• Currently popular among commercial industrial
servo drives
![Page 11: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/11.jpg)
Communications• CAN
– Host Controller– External Sensors– DeviceNet
• LIN– Host Controller– Automotive
• RS-232– Host PC– Display/Keypad
• RS-485– Multi-drop
• SPI– Interprocessor– Absolute Encoder– EEPROM
• I2C– EEPROM– Display
![Page 12: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/12.jpg)
Digital I/O
• Allow drive to interact with the outside world– Sensors– Limit Switches– Relays– Enable Signal– Fault Output
![Page 13: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/13.jpg)
Analog I/O• To/From the outside world
– Velocity command– Torque command– External sensor
• Potentiometer• LVDT
– Monitor Output (DAC)– +/-10V– 4-20mA
• Within the drive– Current sensing– Voltage sensing– Temperature sensing
![Page 14: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/14.jpg)
Pulse Width Modulation (PWM)
• Modulate the duty cycle of a square wave to generate an output waveform– Generate the switching pattern of power transistors in
a motor drive– Regulate Current flow– Generate AC motor voltages
![Page 15: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/15.jpg)
High Performance DSP
• TMS320C28x Family• Up to 150MHz• Internal Flash Memory
(Up to 512K)• Internal RAM (Up to 68K)• Floating Point Unit (300
MFLOPS)• Includes peripherals
needed for motor control
![Page 16: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/16.jpg)
High Performance DSP
• ADC – 12-bit, 12.5 MSPS– Current Sensing– Voltage Sensing– Resolver– Analog Inputs
![Page 17: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/17.jpg)
High Performance DSP
• Enhanced Quadrature Encoder Pulse Module (eQEP)– Implement incremental
encoder feedback– Use as Pulse/Direction
input
![Page 18: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/18.jpg)
High Performance DSP
• Enhanced PWM Module (ePWM)– Control switching of
the power hardware– Digital to Analog
Conversion (DAC)• Generate resolver
excitation signal
![Page 19: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/19.jpg)
High Performance DSP
• Communications Peripherals– SPI– SCI– I2C– CAN
![Page 20: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/20.jpg)
Power Hardware Design
• DC Bus• Inverter• Control power• High-side supplies• Current Sense
![Page 21: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/21.jpg)
DC Bus
• The DC Bus supplies power to the motor• Supply can be from a DC source or rectified AC• An AC source is typically single or three-phase
![Page 22: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/22.jpg)
DC Bus – Single Phase AC Input• Rectifier• Inrush current
limiting• DC Bus capacitors• Voltage doubler
![Page 23: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/23.jpg)
DC Bus – Rectifier
• Single-phase for up to 1-2KW• Higher power requires three-phase input and
three-phase rectifier
![Page 24: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/24.jpg)
DC Bus – Inrush Current Limiter
• During a “cold start” DC Bus capacitors initially look like a short circuit
• Need to limit inrush current to prevent damage to rectifier and DC Bus capacitors.
![Page 25: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/25.jpg)
DC Bus – Inrush Current Limiter• Classic approach is to use a resistor in series
with the DC Bus• Once capacitors are charged resistor is shunted
by a relay• Resistor doesn’t need to carry full DC Bus
current
![Page 26: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/26.jpg)
DC Bus – Inrush Current Limiter
• Resistor and Relay inrush current limiter is a common failure point in motor drives
• Relay can’t be used in some hazardous environments
![Page 27: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/27.jpg)
DC Bus Inrush Current Limiter• Alternative – Negative Temperature Coefficient
Thermistor (NTC)• Starts out at high resistance when cold, resistance
decreases to a few milliohms as current flows and device heats up
• No need for shunt relay• Limited range of continuous current ratings• May not work when ambient temperature requirements
are high
![Page 28: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/28.jpg)
DC Bus – Inrush Current Limiter
• Replace relay with a solid state device• OK for hazardous environments• Requires more hardware to turn the device ON
![Page 29: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/29.jpg)
DC Bus – Inrush Current Limiter
• Need to extensively test whatever method you choose– At max ambient temperature– At max load– Power cycle testing
![Page 30: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/30.jpg)
DC Bus – Voltage Doubler
• Ability to obtain 300V DC Bus from 110VAC source
• Each capacitor charges separately on opposing half cycles of the AC input
• Rectified DC Bus is equal to 2 times the peak AC input
• Output power must stay the same so max continuous current is cut in half
![Page 31: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/31.jpg)
Inverter
• A three-phase bridge made of IGBTs or MOSFETs that switch power to the motor
• Usually implemented as 6 discrete devices or 1 Intelligent Power Module
![Page 32: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/32.jpg)
Inverter - IPM• Intelligent Power Modules are typically designed
to directly interface to a DSP or microcontroller• Integrated high and low-side gate drive• Integrated UVLO• Integrated Over-current/Short-circuit protection• Limited packaging options• Limited current/voltage ratings
![Page 33: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/33.jpg)
Inverter – Discrete Implementation
• More packaging flexability• Greater variety in voltage/current ratings• Need to design external gate drive, UVLO, and
over-current detection
![Page 34: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/34.jpg)
Control Power Supply
• Minimum of two supplies– Gate Drive supply– Logic supply
• Regulated from DC Bus or separate control power input
• Isolated or Non-isolated
![Page 35: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/35.jpg)
Non-isolated Buck Converter• Usually used in low-
cost designs• Regulate control
supplies directly from DC Bus
• Digital supply regulated from Gate Drive supply with LDO
![Page 36: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/36.jpg)
Isolated Flyback Converter• Powered from DC bus or separate control power input
• Generate multiple voltages
![Page 37: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/37.jpg)
High-Side Supplies
• Why do we need separate high-side supplies?• Boot-strap supplies• Separate floating supplies
![Page 38: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/38.jpg)
Why High-Side Supplies
• IGBT needs VGE > VGEsat to turn completely on
• MOSFET needs VGS > VGSsat to turn completely on
![Page 39: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/39.jpg)
Why High-Side Supplies
• Emitter (or Source) of High-Side device “floats” with motor phase
![Page 40: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/40.jpg)
Bootstrap Supplies
• High-Side Gate Drive powered by bootstrap capacitor
• Capacitor charged through diode when low-side device is ON
![Page 41: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/41.jpg)
Bootstrap Supplies
• Can’t run at 100% PWM duty cycle indefinitely
• Need some low-side ON-time to charge bootstrap capacitor
• Inexpensive
![Page 42: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/42.jpg)
Bootstrap Supplies• Some considerations
for sizing bootstrap components– Minimum Vboot
voltage– Gate driver quiescent
current– IGBT Gate charge– High-side On-time
![Page 43: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/43.jpg)
Separate Floating Supplies• Add three additional windings to flyback transformer
• No more limitations on duty cycle
• Bigger transformer• More expensive
![Page 44: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/44.jpg)
Current Sense
• Shunt resistor– Current is measured as voltage drop across a current
sense resistor
• Hall-effect device– The magnetic field of a current carrying wire is sensed
and converted to a voltage
![Page 45: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/45.jpg)
Shunt Resistor
• Place between low-side power device and DC Bus N– Current sense when low-
side is ON and high-side is off
– Can’t achieve 100% duty cycle, need some OFF time to sense current
– Because of power loss, becomes less practical as current gets higher
![Page 46: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/46.jpg)
Shunt Resistor• Place shunt resistor in motor phase
– Need isolated measurement circuitry– Able to sense currents at 100% duty cycle
![Page 47: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/47.jpg)
Hall-effect Current Sensor
Hall EffectCurrentSensor
DC Bus P
DC Bus N
U
WV Motor
Hall EffectCurrentSensor
• Inherently and isolated sensor• Usually able to be powered
from logic supply• Less power dissipation, able to
sense higher currents• Typically more expensive than
shunt measurement• Available in fixed sensitivity
ranges
![Page 48: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/48.jpg)
Motor Control Hardware/Software Interface
D(z) D/A G(z)
A/D Sensor
++
-
)(ˆ nTe)(nTr
)(ˆ nTy
)(nTu )(tu)(ty
)(td p
)(tds
• Information about the system is acquired through the ADC
• The system is controlled by the PWMs
• Both information exchanges happen through peripherals in the 28x DSPs
• Other feedback is acquired through logical interfaces like GPIO, QEP, Capture and Comm. peripherals
![Page 49: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/49.jpg)
ADC Sampling• For a quality motion control
algorithm, accurate current information is required
• Noise can be reduced by synching current sampling with PWM frequency
• Some phase delay between PWM switching edge and ADC sample should be applied to allow for signal to settle
• If sampling more than one phase of a motor simultaneous Sampling should be used to acquire signals at same point in time.
• Proper capacitance on ADC inputs should be used to allow for good charge transfer. A good rule is 200x the ADC capacitance
![Page 50: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/50.jpg)
ADC Sampling for FOC• Current can be sampled in leg of
switch or inline with motor phase• If sampled in leg of switch a time
when all Switches are switched to ground must be allowed
• Leg sampling will not allow for 100% duty cycle operation
• Depending on worst case slew rate as much as 10% duty cycle might be lost
• Sampling in line with phase requires either a floating reference point or the use of hall or other non intrusive current sensors.
![Page 51: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/51.jpg)
PWM• Sampling should be synched
to PWM frequency• System torque/current loop
should also run at PWM frequency and should be able to be processed/executed in the same period
• The main control loop should also run at this frequency or some even multiple of this frequency to keep system synchronous.
![Page 52: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/52.jpg)
FOC Controls DiagramSample Custom Designed Blocks TI DMC Library Blocks
3 Phase BLDC Motor
AD
Clark Transform
Park Transform
Quadrature Current PID
DirectCurrent PID
VelocityPID
InversePark
Transform
Space Vector PWMGenerator
Current Phase A
CurrentPhase B
Rotor Position
Estimator
Id
IqVq
Vd
Vq
Vd
VelocityCalculator
from Estimated Position
ProfileGenerator
Control Logic(State Table)
VoltageSupervisory
ADMotor Bus
VoltageVoltage
Phase Voltage Reconstruction
Vds
Vqs
PWM
Velocity
Rotor Position
![Page 53: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/53.jpg)
IQ Math LibraryNear Floating Point Precision with Fixed Point Performance
• TI provided IQ math Library is just one tool available to TI customers.
• Library is available in both Mathworks and as a C library.• TI, its customers and 3rd Parties like D3 have worked together
to optimize available tools and algorithms like the IQ math Library.
More info available at www.ti.com/iqmath
![Page 54: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/54.jpg)
Digital Filtering For Feedback• Observer Tracking filter• Performance adjusted by changing Alpha and Beta• Possible application as a resolver angle filter• Can be related to basic 2nd order Transfer function (TF)• Alpha and Beta can be expressed in terms of a Damping Coefficient and a
Natural Frequency
2
Output
1
Derivative of Output
z
1
Unit Delay1
z
1
Unit Delay
B
Beta
A
Alpha
1
Input
![Page 55: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/55.jpg)
Communications
• CAN• SCI• I2C• SPI• I/O
![Page 56: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/56.jpg)
Modular Design With Simulink®Mathworks and TI Tools
![Page 57: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/57.jpg)
Motor Control Development Kit• A platform for D3 and our customers to begin
development of motor control applications• Include many common features of a motor
control application• Allow expansion and flexibility• A two board design, control board and power
board– Allows mix and match of control and power boards– Allows control board to be a stand-alone product
![Page 58: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/58.jpg)
Motor Development Kit• Contol board based on
TMS320F2806 DSP• Isolated from power
board and outside world• 5V input from power
board or wall pack• All peripherals come to
headers for expansion
![Page 59: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/59.jpg)
Motor Development Kit• Feedback
– Encoder– Resolver
• Communications– RS-232– USB– CAN
• Digital I/O– Inputs (4)– Outputs (3)
• Power Board Interface– PWM (6)– Motor Phase Current Sense (3)– DC Bus Current Sense– DC Bus Voltage Sense– Power Board Fault signal– 5V
![Page 60: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/60.jpg)
Motor Development Kit• Power board designed to accept
Smart Power Modules from 3A to 30A
• DC Bus rectified from 110V or 220V AC
• Voltage Doubler• Separate control power and DC
bus• Isolated from control board• Sense three phase currents and
DC bus current through shunt resistors
• Bootstrap high-side supplies• DC Bus voltage sense
![Page 61: Digital Motion Control System Design - From the Ground Up.](https://reader036.fdocuments.in/reader036/viewer/2022081515/56649c775503460f9492c10c/html5/thumbnails/61.jpg)
Motor Development Kit• Come see the MDK in action at our booth