Motor Control and Drive
Motor Control and Drive
- Design Partners
- Control Products
- Driver Products
- Motor Types
- Motor Control Library
- Motor Control Simulation
- motorBench Development Suite
- Reference Designs
Motor Control Library Overview
This library is a collection of optimized functions designed to be used in developing 3-phase motor control applications on dsPIC® Digital Signal Controllers (DSCs).
For customers looking for our 32-bit motor control software solutions:
- For the PIC32MK series of microcontrollers (MCUs), please refer to MPLAB Harmony for the latest code examples
- For Arm® Cortex® based SAM devices (SAM C/D/E families), please refer to Atmel START
The Motor Control Library contains function blocks that are optimized for the dsPIC33C, E and F families of DSCs. All functions in this Motor Control Library have input(s) and output(s), but do not access any of the DSC peripherals. The library functions are designed to be used within an application framework to provide an efficient and flexible solution for implementing a FOC motor control application.
The block diagram to the right shows a typical usage scenario. The user-developed motor control application interfaces to the DSC peripherals while using function calls into this library to perform most of the time-critical operations.
The Motor Control Library hosts functions in two implementation variants:
- C - functions are declared with static and inline keywords.
- Assembly - functions are defined in a C-callable archive file with function interfaces defined in the motor_control.h file.
Library users may choose to use one or both or a mixture of these two implementation variants. Unused implementation variants of the library will not consume data or program memory on the target device.
Elements of the Library
In order to start using the Motor Control library, download a copy of the library from this webpage using the link below. Then, extract the library files from the downloaded archive file into your application source files folder. For more details on the Usage Model, refer to Help document that is included in the Motor Control library.
Motor Control Library Function list
|MC_CalculateSineCosine_Assembly_Ram||This function calculates the Sine and Cosine values for a specified angle input.|
|MC_CalculateSineCosine_InlineC_Ram||This function calculates the Sine and Cosine values for a specified angle input.|
|MC_CalculateSpaceVectorPhaseShifted_Assembly||This function calculates the duty cycle values based on the three scaled reference vectors in the a-b-c reference frame and the PWM period value.|
|MC_CalculateSpaceVectorPhaseShifted_InlineC||This function calculates the duty cycle values based on the three scaled reference vectors in the a-b-c reference frame and the PWM period value.|
|MC_ControllerPIUpdate_Assembly||This function calculates the PI correction.|
|MC_ControllerPIUpdate_InlineC||This function calculates the PI correction.|
|MC_TransformClarke_Assembly||This function calculates the Clarke transformation.|
|MC_TransformClarke_InlineC||This function calculates the Clarke transformation.|
|MC_TransformClarkeInverseSwappedInput_Assembly||This function calculates the scaled reference vectors using inputs in an alpha-beta reference frame.|
|MC_TransformClarkeInverseSwappedInput_InlineC||This function calculates the scaled reference vectors using inputs in an alpha-beta reference frame.|
|MC_TransformPark_Assembly||This function calculates the Park transformation.|
|MC_TransformPark_InlineC||This function calculates the Park transformation.|
|MC_TransformParkInverse_Assembly||This function calculates the inverse Park transformation.|
|MC_TransformParkInverse_InlineC||This function calculates the inverse Park transformation.|