Comments (6)
Interesting timing for a comparison:
Source: https://www.mathworks.com/campaigns/offers/next/field-oriented-control-techniques-white-paper.html
Note
We're not that bad, after all!
cc @marcoaccame @sgiraz @mfussi66 @Nicogene @maggia80
from icub-firmware-models.
➡️ On AMCBLDC
In point 2 I want to remark that the AMC_BLDC_step_FOC()
function when the control mode is IDLE
.
When the control mode is set to CURRENT
instead, it takes
I Apologize for the mistake/confusion!
By the way, the EventViewer
shows that the whole DMA interrupt takes about
Measuring with the scope we got onCurrents_FOC_innerloop
function:
...And
static void adc2_HalfTransferComplete_cb(ADC_HandleTypeDef *hadc)
{
// TODO: start measuring from here
GPIOB->BSRR = (uint32_t)0x0020; // 0x0004
#if defined(MOTORHAL_changes)
rawCph1 = adc2_Buffer[0].cph1;
rawCph2 = adc2_Buffer[0].cph2;
rawCph3 = adc2_Buffer[0].cph3;
pwmSetCurrents_cb(rawCph1, rawCph2, rawCph3);
#if !defined(MOTORHALCONFIG_DONTUSE_RUNTIMECURR_FILTERING)
analogMovingAverageFromISR(&cph1Filter, rawCph1);
analogMovingAverageFromISR(&cph2Filter, rawCph2);
analogMovingAverageFromISR(&cph3Filter, rawCph3);
#endif
#else
rawCph1 = adc2_Buffer[0].cph1;
rawCph2 = adc2_Buffer[0].cph2;
rawCph3 = adc2_Buffer[0].cph3;
pwmSetCurrents_cb(rawCph1, rawCph2, rawCph3);
analogMovingAverageFromISR(&cph1Filter, rawCph1);
analogMovingAverageFromISR(&cph2Filter, rawCph2);
analogMovingAverageFromISR(&cph3Filter, rawCph3);
#endif
GPIOB->BRR = (uint32_t)0x0020; // 0x0004
}
In summary (when in CURRENT control mode):
AMC_BLDC_step_FOC() function |
|
onCurrents_FOC_innerloop function |
|
the whole DMA
|
|
cc @Nicogene @pattacini @marcoaccame @mfussi66
from icub-firmware-models.
➡️ AMC2C (66.6 KHz)
When the control mode is set to CURRENT
instead, the AMC_BLDC_step_FOC()
function takes
The the whole onCurrents_FOC_innerloop
function takes
The whole DMA
takes
With the EventViewer
we got about
In summary (when in CURRENT control mode):
AMC_BLDC_step_FOC() function |
|
onCurrents_FOC_innerloop function |
|
the whole DMA
|
|
cc @pattacini @marcoaccame @maggia80 @Nicogene
from icub-firmware-models.
Great analysis @sgiraz !
To summarize we have
AMC2C (66.6 KHz) | AMCBLDC | |
---|---|---|
AMC_BLDC_step_FOC() function |
|
|
onCurrents_FOC_innerloop function |
|
|
the whole DMA
|
|
|
"Why is AMC2C slower than AMCBLDC?" We know this is an ongoing study and we're probably at the right point to contact ST.
A ~ 2x factor seems a lot, maybe it is the case of contacting ST
from icub-firmware-models.
The analysis of @sgiraz pointed out an important timing issue on amc2c
, and this will be further investigate contacting ST, after that we hopefully know how to align the performance of the two boards.
Closing.
from icub-firmware-models.
This task has to be done after harmonizing Ts_FOC
between the 2 boards.
from icub-firmware-models.
Related Issues (20)
- Explore ways to support code reusability HOT 4
- Study the gut of the Supervisor HOT 2
- Study and sketch a first proposal for extending the Supervisor_RX – Stint 1 HOT 5
- Extend data dictionary to deal with multiple motors – Stint 1 HOT 30
- Refactor AMCBLDC project to rely on external components HOT 1
- AMCBLDC: supervisorTX doesn't handle the overcurrent flag. HOT 6
- Extend data dictionary to deal with multiple motors – Stint 2 HOT 18
- AMCFOC – Refactor the Supervisor motor-independent part HOT 16
- AMCFOC – Streamline block duplication HOT 3
- AMCFOC: refactor motor-specific supervisor to be used with `For Each subsystem` HOT 14
- Inspect and resolve the interaction between `For each subsystem` and FOCInnerLoop HOT 4
- CMSIS routines for `sin`/`cos` are not used in FOC HOT 24
- AMCFOC – Extend to AMCFOC the improvements recently applied to AMCBLDC HOT 2
- AMCFOC – Test the architecture HOT 17
- AMCFOC – Port latest dev from AMCBLDC project HOT 4
- AMCBLDC: Inspect suspect regression in simulation HOT 7
- Perform preliminary firmware tests on the AMC-BLDC HOT 40
- Setting FOC Ts = 45us creates current oscillations HOT 3
- The switch Voltage → Current control is NOT bumpless HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from icub-firmware-models.