Simple data test incorporating FOC-related libraries
This example verifies various transforms libraries used in motor-control applications, specifically as a building block of Field-Oriented Control (FOC) motor design.
It demonstrates how to run Clarke, Park, Inverse Park transforms and space-vector generation (SVGEN). This test tries to mimic a conventional workflow of passing current values into Clarke transform, then Park, then Inverse Park (PI controllers are neglected here but should exist for both open and closed-loop design) and finally passing to SVGEN to generate the three-phase ABC values.
The test uses an arbitrary phasor angle that feeds into park/ipark, as opposed to an angle generation module required by an actual FOC design.
The test vector then compares the PARK, SVGEN results to ensure the integrity of the library.
| Folder/Files | Description |
|---|---|
| ${SDK_INSTALL_PATH}/examples/rtlibs/transforms/transforms_test | |
| transforms_test.c | Main function for transforms library testing |
| transforms_test.h | Contains all initialization of test structures and variables |
| ${SDK_INSTALL_PATH}/source/rtlibs/transforms | |
| clarke/ | Folder containing CLARKE library source |
| park/ | Folder containing PARK library source |
| ipark/ | Folder containing IPARK library source |
| svgen/ | Folder containing SVGEN library source |
| Parameter | Value |
|---|---|
| CPU + OS | r5fss0-0 nortos |
| r5fss0-0 freertos | |
| Toolchain | ti-arm-clang |
| Boards | am243x-evm, am243x-lp |
| Example folder | examples/rtlibs/transforms/transforms_test |
Shown below is a sample output when the application is run, assuming all tests pass: