Embedded Motor Control Software IP for Servo drives Applications
Datasheet for Altera Cyclone V FPGAs
© COPYRIGHT Alizem i...
Embedded Motor Control Software IP for Servo drives Applications
Datasheet for Altera Cyclone V FPGAs
© COPYRIGHT Alizem i...
Embedded Motor Control Software IP for Servo drives Applications
Datasheet for Altera Cyclone V FPGAs
© COPYRIGHT Alizem i...
Embedded Motor Control Software IP for Servo drives Applications
Datasheet for Altera Cyclone V FPGAs
© COPYRIGHT Alizem i...
Embedded Motor Control Software IP for Servo drives Applications
Datasheet for Altera Cyclone V FPGAs
© COPYRIGHT Alizem i...
Embedded Motor Control Software IP for Servo drives Applications
Datasheet for Altera Cyclone V FPGAs
© COPYRIGHT Alizem i...
Embedded Motor Control Software IP for Servo drives Applications
Datasheet for Altera Cyclone V FPGAs
© COPYRIGHT Alizem i...
Embedded Motor Control Software IP for Servo drives Applications
Datasheet for Altera Cyclone V FPGAs
© COPYRIGHT Alizem i...
Embedded Motor Control Software IP for Servo drives Applications
Datasheet for Altera Cyclone V FPGAs
© COPYRIGHT Alizem i...
Embedded Motor Control Software IP for Servo drives Applications
Datasheet for Altera Cyclone V FPGAs
© COPYRIGHT Alizem i...
Upcoming SlideShare
Loading in …5
×

Datasheet - Alizem Motor Control IP for Servo Drives Applications on Altera Devices

1,392 views

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,392
On SlideShare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
Downloads
18
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Datasheet - Alizem Motor Control IP for Servo Drives Applications on Altera Devices

  1. 1. Embedded Motor Control Software IP for Servo drives Applications Datasheet for Altera Cyclone V FPGAs © COPYRIGHT Alizem inc. 2015 - All Rights Reserved 1/10 General Description This document presents detailed technical information regarding Alizem Embedded Motor Control Software IP for Servo Drives applications. This software is intended to be integrated into Altera® FPGA-based motor drive systems. Its design is based on a field- oriented (FOC) / vector motor control method with space vector PWM (SVPWM) and it can be used for torque, speed or position control applications. Features  Designed for BLDC, Permanent Magnet Synchronous and Induction Motors  Field-Oriented Control (FOC) / vector control for maximum dynamic performance  Position / current feedback: works with any type of transducer  IoT / Smart-grid ready with integrated energy consumption estimation  Safety operation with fault detection capability  Configurable dead-time for minimized harmonic losses and noise  QSys-ready component for Altera Cyclone V FPGAs  Hardware and software optimized for small FPGA footprint  Quick and easy-to-integrate: No extensive FPGA or Motor Control skills required  Tested in the field on 30W to 100kW BLDC and PMSM motors Typical Applications and Markets  Industrial Servo Drives and multi-axis robotics  Automotive Powertrains  Medical Devices  Any High Dynamics applications Typical System Schematic Deliverables  Encrypted QSys component + Perpetual License  Application Programming Interface (API) software library for Nios® II processors  Easy-to-understand User Manual & Reference design  Full integration support (internet / phone / onsite) & IP customization engineering  IP demo available for FalconEye V1.4 and HSMC (V2.0) development kits Altera FPGA NiosII Soft processor Main Application Loop Motor Position & Speed Controller Output pins Electric Motor Other system components (User Interface, Network Connectivity) Qsys Component Two-Level Voltage Fed Inverter FOC algorithm Fault Detection Indicator Other software drivers System Test & Debug Module Input pins TRANSDUCERS SVPWM Fault Detection Transducers interface DeadTime
  2. 2. Embedded Motor Control Software IP for Servo drives Applications Datasheet for Altera Cyclone V FPGAs © COPYRIGHT Alizem inc. 2015 - All Rights Reserved 2/10 Detailed Motor Control Algorithm Description Schematic Motor Control algorithm is a classical field-oriented control (FOC)/vector control algorithm: ISR Timing Details You can adjust the “ADC_DELAY” parameter to make sure measurements are sampled: (1) after current transients to minimize noise and (2) to make sure ISR ends just before the next cycle. ISR is triggered when the sensors sampling process is finished. PISPEED_REF PI DQ<=ABC IA IB/IC POSITION PWM A (H/L) B (H/L) C (H/L) DQ=> ABC Id iq vd_ref vq_ref SPEED ESTIMATION POSITIONω iq_ref Speed Controller Torque Controller Transforms INVERTER ELECTRIC MOTOR SENSORS TIME 0 (PWM CYCLE START) TIME 3125 (PWM CYCLE END) CURRENT TRANSIENT (NOISY FOR ADC) PHASE CURRENT STEADY-STATE (OK FOR ADC) ADC_DELAY PARAMETER EXAMPLE FOR 50 MHz CLOCK AND 16 kHz PWM CYCLE SAMPLING ISR TIME
  3. 3. Embedded Motor Control Software IP for Servo drives Applications Datasheet for Altera Cyclone V FPGAs © COPYRIGHT Alizem inc. 2015 - All Rights Reserved 3/10 Architecture description Schematic This Embedded Motor Control Software IP is composed of two components:  A QSys component: control register interface, Space Vector Pulse Width Modulation (PWM) block, power converter stage fault block and optional position/speed Transducer Interface block.  A Nios II software layer (API) that includes the following commands: a mode selector, a motor speed controller, an energy consumption estimator, a power factor estimator, a fault detection indicator and a system test & debug module. API Overview Software driver API Application Programming Interface (API): this how you connect the software to your main application loop using simple functions such as “set motor speed”. The API has multiple modes of operation meant to help the user during the software integration process and during software operation. The API enables to interface with any type of position, voltage or current sensors. Below are described the main API functions. set_mode(mode) This function sets the IP in the following modes of operation: Mode Name Description 0 Default Default mode. Everything is shut off. 1 Debug power stage This mode aims to check the proper connection between power stage pins in design and actual power stage pins. No load should be connected to power stage. Qsys component PWM Mode Register Space Vector PWM & FOC block Motor Speed Reference Register Position/Speed Transducer Interface block Fault Detection Register PWM Deadtime Register Modulation Index Register Transducer Measurements Register AVALON BUS INTERFACE FPGA DEVICE INPUT/OUTPUT PINS ALTERA NIOS II SOFT-PROCESSOR BOARD SUPPORT PACKAGE (Altera HAL / Micrium MicroC/OS-II) Software driver API USER’S APPLICATION Set Mode Set Motor Speed Set Space Vector State Get Position & Speed Estimation Get Energy & Power Factor Estimation Power converter stage fault block Set PWM Deadtime Get Fault Detection Set Speed Ramp Acceleration Functions Registers
  4. 4. Embedded Motor Control Software IP for Servo drives Applications Datasheet for Altera Cyclone V FPGAs © COPYRIGHT Alizem inc. 2015 - All Rights Reserved 4/10 2 Debug transducers This mode aims to check the proper connection between current & position transducers with their corresponding electronic device pins. 3 Debug system protection This mode aims to make sure that system protection (over current, over DC bus voltage and over temperature) works well before running the motor and prevent system damage or injuries. 4 Run open-loop This mode aims to run the motor with simple six- step switching mode to validate the proper operation of power stage, position encoder and software drivers. Voltage amplitude and frequency can be set by using the function: set_debug_mode_parameter() You can have the drive to auto-shut off after a few seconds by using the same function. 5 Run closed-loop (current/torque). This mode aims to run the motor with closed- current loop. This mode should be used to tune current control parameters and operate the motor in torque mode. 6 Run closed-loop (speed) This mode aims to run the motor with closed- speed loop. This mode should be used to optimize speed control parameters and operate the motor in speed mode. set_debug_mode_parameter(parameter, value) Parameter Value 0 Open-loop Frequency Frequency value in Hz (integer) 1 Open-loop Voltage Four options: 0 (off), 1, 2, 3 (maximum voltage) 2 Auto-shut off Enable 0: Disabled 1: Enabled 3 Auto-shut off Time In seconds. 4 Torque reference Nm – For mode 5 only set_system_protection_parameter(parameter, value) Parameter Value 0 Maximum VDC bus voltage Based on your measurement parameters. 1 Minimum VDC bus voltage Based on your measurement parameters. 2 Temperature warning limit Based on your measurement parameters. 3 Temperature alarm limit Based on your measurement parameters. 4 Maximum current phase limit Based on your measurement parameters.
  5. 5. Embedded Motor Control Software IP for Servo drives Applications Datasheet for Altera Cyclone V FPGAs © COPYRIGHT Alizem inc. 2015 - All Rights Reserved 5/10 5 Phase Current Protection 111b = CBA, 101b = CA, 000b None. 6 Maximum mechanical speed In RPM. 7 Speed measurement Protection 0: Disabled, 1: Enabled set_debug_mode_parameter(parameter, value) Parameter Value 0 Open-loop Frequency Frequency value in Hz (integer) 1 Open-loop Voltage Four options: 0 (off), 1, 2, 3 (maximum voltage) 2 Auto-shut off Enable 0: Disabled 1: Enabled 3 Auto-shut off Time In seconds. 4 Torque reference Amps (Iq) – For mode 5 only set_motor_parameter(parameter, value) Parameter Value 0 Motor Type 0 = BLDC, 1 = PMSM, 2 = IM 1 Number of pole pairs According to your motor’s datasheet. set_power_converter_parameter(parameter, value) Parameter Value 0 PWM switching frequency Value should be system clock frequency divided by PWM switching frequency. For 50 MHz system clock and 10 kHz PWM frequency, this value should be 5000. 1 Switching Deadtime Value should be desired deadtime multipied by system clock frequency. For 2e-6s deadtime and 50 MHz system clock, this value should be 100. set_current_measurement_parameter(parameter, value) Parameter Value 0 Current Offset Phase A Corresponding value such that current value is 0 at no current test in Mode 2. This data is stored as within alizemip_servo_state structure: current_offset_phase_a current_offset_phase_b current_offset_phase_c 1 Current Offset Phase B 5 Current Offset Phase C 2 Scaling Factor Phase A Corresponding value such that current value is 5 amps at 5 amps current test in Mode 2. This data is stored as within alizemip_servo_state structure:3 Scaling Factor Phase B
  6. 6. Embedded Motor Control Software IP for Servo drives Applications Datasheet for Altera Cyclone V FPGAs © COPYRIGHT Alizem inc. 2015 - All Rights Reserved 6/10 6 Scaling Factor Phase C current_scalingfactor_phase_a current_scalingfactor_phase_b current_scalingfactor_phase_c 4 ADC trigger delay Number of clock cycles within one cycle at which ADC trigger pin should be set to one to trigger ADC sampling and to have measurements ready for next cycle. 7 Phase current measurement 0: A & B, 1: A & C set_position_measurement_parameter(parameter, value) Parameter Value 0 Position offset - 1 Position scaling factor Value should be set to scale position into a 16 bits unsigned range (0-65535). set_system_protection_parameter(parameter, value) Parameter Value 0 Maximum VDC bus voltage Based on your measurement parameters. 1 Minimum VDC bus voltage Based on your measurement parameters. 2 Temperature warning limit Based on your measurement parameters. 3 Temperature alarm limit Based on your measurement parameters. 4 Maximum current phase limit Based on your measurement parameters. 5 Phase Current Protection 111b = CBA, 101b = CA, 000b None. 6 Maximum mechanical speed In RPM. 7 Speed measurement Protection 0: Disabled, 1: Enabled set_current_loop_parameter(parameter, value) Parameter Value 0 Id Proportional Gain 2*pi*500*L*2^10 where L is motor’s Ld/Lq 1 Id Integral Gain (R/L)*IdP-gain*(1/Fpwm) where R,L are motor’s parameters and Fpwm is the PWM frequency 2 Iq Proportional Gain Same as Id-P 3 Iq Integral Gain Same as Id-I 4 Torque current Iq limit To fit your application 5 Speed voltage limit To fit your application
  7. 7. Embedded Motor Control Software IP for Servo drives Applications Datasheet for Altera Cyclone V FPGAs © COPYRIGHT Alizem inc. 2015 - All Rights Reserved 7/10 set_speed_loop_parameter(parameter, value) Parameter Value 0 Speed Proportional Gain - 1 Speed Integral Gain - 2 Speed Control Frequency As a factor of PWM switching frequency. set_speed_reference(speed) This function sets the desired steady-state mechanical speed of the motor in RPM. set_speed_ramp(∆time1, ∆speed1, ∆time_delay, ∆time2, ∆speed2 ) This function manages motor speed acceleration following a ramp profile with initial acceleration (time1), a delay and a final acceleration. Parameter ∆time corresponds to the number of speed control loop cycles during which the ramp acceleration occurs and ∆speed corresponds to the desired change of speed (in RPM) for each time cycle. In a 1kHz system, a +1000 RPM 0.5s ramp acceleration followed by a 2s delay and a -500 RPM 0.5s ramp acceleration would be set as: set_speed_ramp(500, 2,2000,500,-1). (int) get_transducers_fault_status() This functions returns 0 if no error has been detected. Otherwise: Bit set to 1 Error code 0 VDC bus voltage error (max limit) 1 VDC bus voltage error (min limit) 2 Over Temperature warning limit 3 Over Temperature alarm limit 4 Over current on phase A 5 Over current on phase B 6 Over current on phase C 9 Over speed limit reset_transducesr_fault_status() This function resets error register to 0. (int) get_carrier_value() This function is returning the value of a counter running from 0 to 2*[PWM switching frequency (see preceding set_power_converter_parameter function for definition)] and it is reset ADC are triggered. It is meant to be used when sampling rotor’s mechanical position from a resolver.
  8. 8. Embedded Motor Control Software IP for Servo drives Applications Datasheet for Altera Cyclone V FPGAs © COPYRIGHT Alizem inc. 2015 - All Rights Reserved 8/10 USER-DEFINED FUNCTIONS (short) sample_current_phase_a, sample_current_phase_b, sample_current_phase_c Those functions are user-defined function for sampling phase currents. Outputs of those functions are piped into the motor control algorithm software. When 0 amps is measured, those functions should return 0. When 1 amps is measured, those functions should return 1*[scaling factor] (see set_current_measurement_parameter function above). unsigned short sample_position This function is a user-defined function for sampling rotor’s mechanical position on 16 bits. Output of this function is piped into the motor control algorithm software. When rotor’s mechanical position is 0 rad, this function should return 0. At π rad, this function should return 32768 and at 2π(1-1/216 ) rad it should return 65536. unsigned short sample_voltage_dcbus This function is a user-defined function for sampling VDC bus voltage. This function should return 0 at 0V and a positive value under 65536 at VDC max limit + 100 (i.e. scaling is left to the user who should set alarms/warning values accordingly). unsigned short sample_temperature_powerstage This function is a user-defined function for sampling power stage temperature. This function should return 0 at 0 DEGC and a positive value under 65536 at temperature max limit + 20 (i.e. scaling is left to the user who should set alarms/warning values accordingly). unsigned short sample_status_powerstage This function is a user-defined function for sampling power stage status pins.
  9. 9. Embedded Motor Control Software IP for Servo drives Applications Datasheet for Altera Cyclone V FPGAs © COPYRIGHT Alizem inc. 2015 - All Rights Reserved 9/10 Quick, easy and safe integration process This Embedded Motor Control Software IP is designed to be integrated in your system by following these steps: (1) QSys component integration in Quartus II. (2) System connection to external pins and hardware system generation, (3) Application software development using built-in software drivers. Resources Utilization and Performance Altera Cyclone® IV/V FPGAs Tested on an EP4C40F484C6N and EP5CSXFC6D6F31C8ES Altera FPGA devices controlling a 500W Danaher PMSM powered by a 400VDC 5A power stage (FalconEye V1.4 and V2.0 platforms). Logic Elements (LEs) : 450 for VHDL + NIOS II processor (1929 LEs) (approx.) Memory: 70kb. Special Application Requirements? If your application has special requirements to be fit that are not currently included in this Motor Control IP (such as Power Factor Correction, DC Bus Voltage Protection, IEC 61131-3 compatibility, etc.) please contact us and we will be pleased to customize this IP to make it fit perfectly in your application. Three Packaging Options Software IP Only IP is delivered as encrypted software files to be directly integrated on an Altera FPGA inside Altera EDA Tools environment. Complete SoC This package consists of a full FPGA System-on-chip – including Alizem Motor Control IP and other IP such as Industrial Ethernet – customized and tested for customer’s application. The system is delivered as FPGA configuration files ready to be downloaded to a FPGA chip. Turnkey solution This package consists of a complete SoC and all electronics circuits, electrical connectors and mechanical interfaces around it.
  10. 10. Embedded Motor Control Software IP for Servo drives Applications Datasheet for Altera Cyclone V FPGAs © COPYRIGHT Alizem inc. 2015 - All Rights Reserved 10/10 Demo Visit Alizem Boutique (shop.alizem.com) for time-limited demo to evaluate this IP on your system. IP Licensing and Price Please contact Alizem for more information. Contact us For more informations regarding this IP, please contact Alizem Sales department : Phone : (+1) 418-614-4643 email : sales@alizem.com Alizem inc. 5731, rue Saint-Louis Suite 103 Lévis (Québec) G6V 4E2 CANADA Website : www.alizem.com Alizem inc., Materializing Performance, Virtual Motor Control IC and other names of Alizem products, product features and services are trademarks and/or service marks of Alizem inc. in Canada and other countries. Altera, ACAP, APEX, Stratix, Quartus, NIOS and other names of Altera products, product features and services are trademarks and/or service marks of Altera Corporation in the United States and other countries. Other product and company names mentioned in this document may be the trademarks of their respective owners. No warranties: This documentation is "as is" without any express or implied warranty of any kind including warranties of merchantability, no infringement of intellectual property or of fitness for any particular purpose. In no event shall Alizem or its suppliers be liable for any damages whatsoever (including, without limitation, damages for loss of profits, business interruption or loss of information) arising out of the use of or inability to use this documentation, even if Alizem has been advised of the possibility of such damages. Because some jurisdictions prohibit the exclusion or limitations of liability for consequential or incidental damages, some of the above limitations may not apply to you. Alizem further does not warrant the accuracy or completeness of the information, text, graphics or other items contained in this document. Alizem may make changes to these materials, or to the products described therein, at any time without notice. Alizem makes no commitment to update this document. DOCUMENT VERSION: 1.3

×