This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Lab21: how to control motor after HFI start

Other Parts Discussed in Thread: MOTORWARE

Having trouble making sense of Lab 21. The documentation for it is quite poor, and not much discussion on it in the forums exists.  Attached are the user files, i haven't made any changes to the lab itself. Note I am using very low induction motor (Scorpion S-4025-12).  I got through labs 2d, 5a, and 5b, as well as 20 with no issues.

-1st problem is that updating any of the  IPD_HFI variables during runtime in the expressions does not affect the motor control at all, so tuning is very very slow. I have to stop debug, change the variables in the user file, and run again to see if it works better. I think i got the variables to be where they work, at least reasonably for now. Still some occasional jitter on start. 

-the name of the variables are different in the lab pdf and in the actual lab's code. Minor, but annoying.

- Now, MOST IMPORTANT, my  understaning is that this lab is supposed to allow me to transition from getting the motor to move from zero with relatively heavy load using HFI, to transition to either speed loop control or torque control FAST. But there is no explanation on how to take over control of the motor once gThrottle_Result has been used to start the motor. Changing the gMotorVars.SpeedRef_krpm value has no effect, regardless the value of gThrottle_Result or the motion of the motor. Is it just a matter of AFSEL_FREQ_LOW_PU ? I've tried a few different values but no success yet. Or is it that the transition to FAST is happening fine, i am just not in control of speed? The motor is spinning at full speed allowed by the voltage (4.5 krpm). 

thanks

proj_lab21.c
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/* --COPYRIGHT--,BSD
* Copyright (c) 2012, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* --/COPYRIGHT--*/
//! \file solutions/instaspin_foc/src/proj_lab05b.c
//! \brief Adjusting the speed current controller
//!
//! (C) Copyright 2011, Texas Instruments, Inc.
//! \defgroup PROJ_LAB05b PROJ_LAB05b
//@{
//! \defgroup PROJ_LAB05b_OVERVIEW Project Overview
//!
//! Adjusting the supplied speed controller
//!
// **************************************************************************
// the includes
// system includes
#include <math.h>
#include "main.h"
#include "sw/modules/ipd/src/32b/ipd_hfi.h"
#include "sw/modules/afsel/src/32b/afsel.h"
#include "sw/modules/fstart/src/32b/fstart.h"
#ifdef FLASH
#pragma CODE_SECTION(mainISR,"ramfuncs");
#endif
// Include header files used in the main function
// **************************************************************************
// the defines
#define LED_BLINK_FREQ_Hz 5
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2352.user.h2337.user_j1.h6052.user_j5.h

  • lui kawasumi said:
    Note I am using very low induction motor (Scorpion S-4025-12).  

    this motor does not have any saliency, the HFI technique will not be successful

    lui kawasumi said:
    my  understaning is that this lab is supposed to allow me to transition from getting the motor to move from zero with relatively heavy load using HFI, to transition to either speed loop control or torque control FAST

    project_lab21 is just torque mode only (used for things like e-Bikes).

    21.       Initial & Slow Speed Position Detection (IPD_HFI) with transition (AFSEL) to FAST: Torque Control Mode [F2806x only for first release]

    22.       Coming Soon: IPD_HFI with Speed Control Mode [and F2802x support]

  • oh I see, I though since the magnets on these are spaced apart, the motor was salient. I suppose there isn't much point in doing this lab then. So given the motor, is Force Angle start the only method available to me for a torqued loaded start?

    On another note, speed control has barely any torque and so it seems pretty useless to me, is there some variable that can increase the torque of a speed controller? Meaning have it chew up as much amp as needed (with some safety cap) to get to its target speed?
  • while magnets being spaced out can effect saliency, I know you won't find any of these hobby motors with enough for the HFI. It takes a very specialized motor design to make this effective.

    yes, ForceAngle Enabled/Disabled would be your only valid way.

    When in speed control mode are able to request a torque up to
    USER_MOTOR_MAX_CURRENT

    if you aren't producing enough torque I first suggest you increase this value. This is the peak of the sinewave for the current.

    For most hobby motors it will be hard to produce high torque at lower speeds because the flux of the machine is so low that the FAST estimation of angle is not accurate enough to guarantee orthogonal orientation of the stator flux.
  • ChrisClearman said:

    21.       Initial & Slow Speed Position Detection (IPD_HFI) with transition (AFSEL) to FAST: Torque Control Mode [F2806x only for first release]

    22.       Coming Soon: IPD_HFI with Speed Control Mode [and F2802x support]

    Hello,

    any update on the last point (22)?

    thank you very much

    lorenzo

  • Lorenzo,

    I should remove that point.

    The IPD_HFI has proved extremely challenging to get working unless the customer has some significant expertise and knows the inductance/saliency and saturation effects of their motor very well.  Because it is not "instant" we have decided to stop investing in solutions that use IPD_HFI.  We are leaving the existing project as-is for customers who want to give it a try.

     

  • Chris,

    thank you very much for your fast answer.

    do you have an high level description of the hfi module? such a schematics?

    have a great weekend

    lorenzo

  • www.ti.com/.../instaspin-zero-and-slow-speed.shtml
    which is similar to the write-up in proj_lab21

    C:\ti\motorware\motorware_1_01_00_16\sw\modules\ipd\src\32b\ipd_hfi.h
    gives all the interface APIs

    there isn't anything more than that
  • Thank you Sir, please do me a favor... have a great weekend!
    Lorenzo
  • Hi Chris,

    May I run the lab21 on the HVKit? What's the lab procedure? Do I just need to set "gMotorVars.Flag_enableSys" and “gMotorVars.Flag_Run_Identify" equal to 1?

    What is the result, if the lab operation successfully? Can I see the rotor position vary when I spin the rotor?

    Thanks!
  • Hi lui kawasumi ,

    Did you run the lab21 successfully? Which platform did you base on? Thanks!
  • lab21 does not have project support for the HVKIT

    you could port this over yourself, but we have never done so

  • Hi Chris,

        Thanks for your reply. I transfer the project lab21 to Lab5b by using Lab21's "user.h"  file and other Library files. I can compile and run the project normally.

    But when I set "gMotorVars.Flag_enableSys" and “gMotorVars.Flag_Run_Identify" equal to 1, I just hear some noise, not any other reaction.

       I read the rotor position from the variable "angle_pu"   in the debug window, it doesn't work normally.

       Could you give me some advices about the lab procedure and the correct result?

       Thank you!

    Eli