AN 1000: Drive-on-Chip Design Example: Agilex™ 5 Devices
ID
826207
Date
7/08/2024
Public
1. About the Drive-on-Chip Design Example for Agilex™ 5 Devices
2. Features of the Drive-on-Chip Design Example for Agilex Devices
3. Getting Started with the Drive-on-Chip Design Example
4. Rebuilding the Drive-on-Chip Design Example
5. Modifying the Design Example for a Different Board
6. About the Scaling of Feedback Signals
7. Motor Control Software
8. Functional Description of the Drive-on-Chip Design Example for Agilex 5 Devices
9. Signals
10. Registers
11. Design Security Recommendations
12. Document Revision History for AN 1000: Drive-on-Chip Design Example for Agilex™ 5 Devices
3.1. Software Requirements for the Drive-on-Chip Design Example for Agilex 5 Devices
3.2. Hardware Requirements for the Drive-on-Chip Design Example for Agilex 5 Devices
3.3. Downloading and Installing the Design
3.4. Setting Up your Development Board for the Drive-on-Chip Design Example for Agilex 5 Devices
3.5. Configuring the FPGA Hardware for the Drive-on-Chip Design Example for Agilex 5 Devices
3.6. Programming the Nios V/g Software to the Device for the Drive-on-Chip Design Example for Agilex Devices
3.7. Debugging and Monitoring the Drive-on-Chip Design Example for Agilex 5 Devices with Python GUI
8.3.6.1. DSP Builder Model for the Drive-on-Chip Designs
8.3.6.2. Avalon Memory-Mapped Interface
8.3.6.3. About DSP Builder for Intel FPGAs
8.3.6.4. DSP Builder for Intel FPGAs Folding
8.3.6.5. DSP Builder for Intel FPGAs Design Guidelines
8.3.6.6. Generating VHDL for the DSP Builder Models for the Drive-on-Chip Designs
8.3.6. FOC Subsystem
The Drive-on-Chip Design uses DSP Builder for Intel FPGAs to generate the HDL code for fixed-point implementations of the field-oriented control (FOC) algorithm. The Nios V/g processor uses this DSP Builder-generated FOC IP as a coprocessor and moves the data between the FOC IP and the peripherals.
Note: Alternatively, the design includes software implementations of the FOC algorithm with the same FOC functionality. You can select which implementation to run using the Debug GUI. In all FOC DSP builder implementations, the design performs the reverse Clarke transform as part of the SVM function in software.
FOC controls a motor's sinusoidal 3-phase currents in real time to create a smoothly rotating magnetic flux pattern, where the frequency of rotation corresponds to the frequency of the sine waves. FOC controls the current vector to keep:
- The torque-producing quadrature current, Iq, at 90 degrees to the rotor magnet flux axis
- The direct current component, Id, (commanded to be zero) inline with the rotor magnet flux.
The FOC algorithm:
- Converts the 3-phase feedback current inputs and the rotor position from the encoder into quadrature and direct current components using Clarke and Park transforms.
- Uses these current components as the inputs to two proportional and integral (PI) controllers running in parallel to adjust the direct current to zero and the quadrature current to the desired torque.
- Converts the direct and quadrature voltage outputs from the PI controllers back to 3-phase voltages with inverse Clarke and Park transforms.
The FOC algorithm includes:
- Forward and reverse Clarke and Park transforms
- Direct and quadrature current
- Proportional integral (PI) control loops
- Sine and cosine
- Saturate functions