Other Parts Discussed in Thread: MOTORWARE
MotorControlSDK v2.01 Lab-is07_SpeedControl
Enabled the PWMDAC output for angle wave form and square wave comes out J8-pin51, 100kHz even when motor was not running .
Then added angle generator code from Lab4 with similar configuration but only to output PWMDAC0 GPIO port, not to control rotor position but to confirm. It was square wave too but Lab guide Fig.28 top (yellow) signal is very angular shaped. So I check all the PWMDAC outputs for any kind of angle shape wave, all are square wave. Yet the default estimated angle output via { pwmDACData.ptrData[0] = &angleFoc_rad; } was square wave too . Why does either default PWMDAC0 or adding angle generator not have angular shaped wave form?
// // initialize the angle generate module // angleGenHandle = ANGLE_GEN_init(&angleGen, sizeof(angleGen)); ANGLE_GEN_setParams(angleGenHandle, userParams.ctrlPeriod_sec); // // set DAC parameters // pwmDACData.periodMax = PWMDAC_getPeriod(halHandle->pwmDACHandle[PWMDAC_NUMBER_1]); pwmDACData.ptrData[0] = &angleGen_rad;//&angleFoc_rad; __mainISR() ~~~ basic code lines ~~~~ /* Produce Angles on PWMDAC0 output J8-pin-51 */ ANGLE_GEN_run(angleGenHandle, estInputData.speed_ref_Hz); angleGen_rad = ANGLE_GEN_getAngle_pu(angleGenHandle); // // compute angle with delay compensation // 25µs*low pass filtered mechanical frequency estimate, rad/sec angleDelta_rad = userParams.angleDelayed_sf_sec * estOutputData.fm_lp_rps;//fm_rps angleEst_rad = MATH_incrAngle(estOutputData.angle_rad, angleDelta_rad); angleFoc_rad = angleEst_rad; // // compute the sin/cos phasor using fast RTS function, callable assembly // phasor.value[0] = cosf(angleFoc_rad); phasor.value[1] = sinf(angleFoc_rad);
Thanks for added info