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.

Working labs, motor slow

Other Parts Discussed in Thread: DRV8301, BOOSTXL-DRV8301, DRV8301-69M-KIT, MOTORWARE, CONTROLSUITE

I am working on the FOC labs and I have just finished lab 2c. I have done the labs twice in an effort not to miss anything.

I am reading the forums as well, and I get the impression that at this point the motor should be running close to top speed. Is this correct? Mine isn't if this is correct. Attached are the spreadsheet and user.h file if I need to look at something extra or change something.

Thanks,

David

  • With a high speed / low inductance / low flux machine you should have finished proj_lab2c with hopefully valid motor parameters.  The motor should have been spinning from EST STATE RampUp through the rest of the ID process until Motor Identified flag = 1.

    You can't run the motor at the end of proj_lab2c, it is just used for ID. You need to move on to the next labs.

     

    There were no attachments on your post, please do post your user.h (and if you want the .xls)

     

  • Chris,

    Thanks for the reply.

    I've read some of your analyses from other posts, very good I'll be glad for you to look at them.

    I am clicking the paperclip icon to attach, please let me know if you get them.

    Thanks,

    David

    2768.user.doc

    0564.My Motor _user_variables .xlsx

  • David,

    Let's look at the values I assume you ID'd

     

    #if (USER_MOTOR == My_Motor)

    #define USER_MOTOR_TYPE                 MOTOR_Type_Pm
    #define USER_MOTOR_NUM_POLE_PAIRS       (4)
    #define USER_MOTOR_Rr                   (NULL)
    #define USER_MOTOR_Rs                   (0.03406183)
    #define USER_MOTOR_Ls_d                 (0.0003197119)
    #define USER_MOTOR_Ls_q                 (0.0003197119)
    #define USER_MOTOR_RATED_FLUX           (0.05712375)
    #define USER_MOTOR_MAGNETIZING_CURRENT  (NULL)
    #define USER_MOTOR_RES_EST_CURRENT      (3.0)
    #define USER_MOTOR_IND_EST_CURRENT      (-0.5)
    #define USER_MOTOR_MAX_CURRENT          (24.4)
    #define USER_MOTOR_FLUX_EST_FREQ_Hz     (20.0)

    With the Rs value you ID'd (high probability of being correct), your Ls value is too high:
    Ls_d                 (0.0003197119)

    You need R / L > maximum frequency (in your spreadsheet you used 433 Hz+), which means Ls needs to be < 75uH.

    With this Ls, you would then have an Isc = Flux / 2pi / Ls = 121 A, which is pretty typical "over design" for a 20A+ motor.

    So, first takeway here is we need to ID your Ls value better.

    Some comments / questions on some other settings

    #define USER_MOTOR_RES_EST_CURRENT      (3.0)
    This should be ~10% of your max full load current. Is max current 30A?  Or, at least high enough to make sure motor starts spinning during EST STATE RampUp


    #define USER_MOTOR_IND_EST_CURRENT      (-0.5)
    This is low...usually set to the negative of RES_EST_CURRENT...or just a bit smaller, like (-2.0)

    #define USER_MOTOR_FLUX_EST_FREQ_Hz     (20.0)
    This is too low. Set to at least 10% of max Hz (43.0)

    I also see that you used the XLS, but you didn't really update these values in user.h

    Some items I would update:
    #define USER_IQ_FULL_SCALE_VOLTAGE_V      (14.0)

    The current sampling on the DRV8301 EVM isn't very good, and we especially see problems on it with these low inductance motors. While you normally want to increase the PWM frequency, it actually makes the current sampling worse.  The BOOSTXL-DRV8301 works better. So for your EVM:
    #define USER_PWM_FREQ_kHz                (15.0)
    #define USER_NUM_PWM_TICKS_PER_ISR_TICK        (1)

    #define USER_MAX_ACCEL_EST_Hzps           (10.0)  

    #define USER_R_OVER_L_EST_FREQ_Hz  (200)  

     

    Make these updates and try proj_lab2c again please.

  • Yes Sir,

    Will be glad to do that, much thanks. I most likely will catch it in the morning I also want to go over what you sent me

    so that I can understand what I am doing.

    Thanks again Chris, talk at ya soon.

    Daivd

  • Hello David and Chris,

    I think it is necessary to confirm before going all along that David uses CCS compiler version 6.2.3 or above.

    Best regards,

    Maria

  • Maria,

    Thank you for the additional information.

    Sadly, I am working on LVDT's today, so it may be a while before I get back to the labs.

    I checked, looking up posts to see how, and I have:

    Code Composer Studio               Version: 5.5.0.00077

    Compiler version TI v6.2.3

    Thanks,

    David

  • Chris,

    I think I made the changes correctly. Must have made a mistake tho, motor won't run at all now.

    Sorry to bother you again, but attached are the files, would you mind looking at them, I learn something every time.

    I have a low voltage error. Looked it up but still don't see my mistake.

    USER_ErrorCode_iqFullScaleVoltage_V_Low

    error

      if((USER_IQ_FULL_SCALE_VOLTAGE_V <= 0.0) ||

        (USER_IQ_FULL_SCALE_VOLTAGE_V <= (0.5 * USER_MOTOR_MAX_CURRENT * USER_MOTOR_Ls_d * USER_VOLTAGE_FILTER_POLE_rps)) ||

        (USER_IQ_FULL_SCALE_VOLTAGE_V <= (0.5 * USER_MOTOR_MAX_CURRENT * USER_MOTOR_Ls_q * USER_VOLTAGE_FILTER_POLE_rps)))

        {

             USER_setErrorCode(pUserParams, USER_ErrorCode_iqFullScaleVoltage_V_Low);

        }

    Thanks,

    David

    4431.My Motor.rar

  • David,

    1. Your spreadsheet and your user.h don't match.  You need to update the sections in user.h based on the calculations from the spreadsheet (yes, it would be nice if we created a user.h for you based on the spreadsheet or some other tool, but we don't yet).

    user.h
    #define USER_IQ_FULL_SCALE_VOLTAGE_V      (12.0)

    .xls

    new USER_IQ_FULL_SCALE_VOLTAGE_V  32.9

    However, when I look at your ErrorCode and use the values from the user.h you attached the ErrorCheck equation isn't true...which makes me think that your project is actually building with a different user.h than what you attached. 

    Looking at user.h it looks like you have your MyMotor commented out

    //#define My_Motor                  104

    but then you added this

    #define USER_MOTOR MY_MOTOR         555

    you need to remove the USER_MOTOR on this line....

    I'm actually interested at what motor it actually used as active...but this is where your main problem is....so clean this up, only have one set of assigning your motor, then setting it to the USER_MOTOR, then defining the motor...

    #define MY_MOTOR         555
    #define USER_MOTOR MY_MOTOR
    #elif (USER_MOTOR == MY_MOTOR)

    etc

    2. There are some other things I would question

    #define USER_MOTOR_RES_EST_CURRENT      (8.5)     // changed to 8.5 from 3.0   4/17/14

    Why did you change this so high? Is 8.5A the smallest value you could use here to get the motor to start spinning during the EST_State RampUp?  It's not impossible, but a bit unusual, especially when you had it at 3.0 previously.  If this motor has a rotor that is very stiff (cogging torque) 8.5A could certainly be needed.


    #define USER_MOTOR_IND_EST_CURRENT      (-8.5)    // changed to -2.0 from -.5  4/17/14

    I would probably lower this.  You can keep this "equal" to the negative of RES_EST_CURRENT at low amperage, but as you increase the amps you really don't need to use as much for IND_EST_CURRENT.  You are injecting negative current (field weakening) which reduces stability of the system the more you use. Better to use a % here...so if you really need (8.5) for RES_EST_CURRENT consider (-4.0) for IND and see how the Ls estimation goes.

     

  • I havn't changed the voltage values yet, or moved the values from the spreadsheet over to user.h file.

    Just wanted to see if I had updated the motor defines correctly, I havn't, Lord I can't see what I have done incorrectly.

    Please see attached screen shots or error and motor define's. Also, yes, I did have a problem with the wrong user.h

    file updating a while back. So as the screen shot shows I try at the top to comment something so I can quickly see

    if the correct user.h file is being used.

    Thanks,

    David

  • Woops ! Here they are attached.

    6622.Motor.rar

  • Please disregard the motor problem.

    I just found out CCS doesn't really update, or seems to anyhow, the user files until you close the program.

    Doesn't seem right, but after I closed the program, It asked to save, I said yes. I the reopened CCS, rebuild and checked for errors. None.

    ?????  

    David

  • Someone else mentioned this...you have to save user.h manually if you open it in CCS. click the save button. Apparently with the files directly linked into the project (like user.c) if you don't save and try to build it will ask you if you want to save the files first...user.h isn't directly linked in, it is just referenced by user.h.  I think we are going to add user.h to the projects so this doesn't happen in future. 

    I never noticed this before because I always open user.h with a text editor directly, so I know to save.  

    You don't have to shut down CCS though...just save your files. 

  • Thank you,

    I'm going over what you sent me, updating user.h and checking spreadsheet and doing the same.

    David

  • Ok, now I am back to the low voltage error.

    Should I delete everything, reload, and start over?

    Attached spreadsheet, user.h file, and screenprint of error.

    Thank you,

    David

    4617.Low voltage error.rar

  • I am unable to find the change made in user.h related to low voltage fault. So I took one of my old saved ones and am using it, starting with lab 01 again.

    Now I am up to lab 2a and I get a board red led fault. I don't know what to change as far as my user.h and xls file at this point. Anyone with a suggestion? Just my point of view but it doesn't appear very clear, as when when after each lab, to up date what, xls or user.h. It does sometimes but doesn't seem to always.

    Anyhow, user.h did correct the low volt error.

    David

  • Changed power supplies, motor now turning, no error on board.

  • Good, I was just starting to read through your post to try to help.

     

    Let me know if you get stuck again.

  • Thank you Chris,

    I just entered

    gMotorVars.Rs_Ohm                                     0.03772001

    gMotorVars.Lsd_H                                          0.0002149043

    gMotorVars.Lsq_H                                          0.0002149043

    gMotorVars.Flux_VpHz                                 0.05652376

    from lab 2 into the user.h file and went on to 2b. While building I got this error and build stopped. (see screen shot)

    Would it help if I got an umbrella between me an this dark cloud over my head?

    David

  • Darn, here is the attachment.

  • Update:

    After twiddleing my thumbs for a  while I decided to shutdown CCS and start it again. This time no error.

    Went though lab 2b ok, however I couldn't find the "debug" file folder to check for "map".  Will enter values into user.h file and excel file and go to 2c. Just wanted you to know I am able to move one.

    David

  • David,

    Your Ls value is going to be lower than the 0.0002x you posted a few posts ago.

    Your Rs / Ls > your maximum frequency

    With such a small Rs your Ls must be smaller.

    It is likely you need to skip 02a/b anyways and use proj_lab02c to ID your motor.  This lab has extra code for these lower Ls motors to put some of our variables into the right scale during ID.

    I'll take a look at the last set of files you uploaded.

     

  • BTW - I have no idea what that error could be...it has nothing to do with the build (your build completed). Something to do with Java?

     

  • David,

    Looking at 6011.board-faults.rar download, you are not making the updates suggested by the spreadsheet into user.h.

    Is your bus voltage 12V or did you increase?  See below, this motor needs more voltage.

    #elif (USER_MOTOR == My_Motor)
    #define USER_MOTOR_TYPE                 MOTOR_Type_Pm
    #define USER_MOTOR_NUM_POLE_PAIRS       (4)
    #define USER_MOTOR_Rr                   (NULL)
    #define USER_MOTOR_Rs                   (0.03406183)
    #define USER_MOTOR_Ls_d                 (0.0003197119)  // incorrect, must be <68uH to support Rs=0.034 and Rs/Ls > 500 Hz. Try using proj_lab2c for motor ID.
    #define USER_MOTOR_Ls_q                 (USER_MOTOR_Ls_d) // Also, 320uH is too large to support high enough Isc = Flux / 2pi / Ls;   A value <68uH would support higher current which you say this motor is...


    #define USER_MOTOR_RATED_FLUX           (0.05712375) // This motor will only go 210 Hz (flux_VpHz * Hz = V) before Bemf goes over the 12V you specify in your spreadsheet.. You then must use field weakening.  You need about 29Vbus to support near the 500 Hz top speed you claim you need.


    #define USER_MOTOR_MAGNETIZING_CURRENT  (NULL)
    #define USER_MOTOR_RES_EST_CURRENT      (3.0)
    #define USER_MOTOR_IND_EST_CURRENT      (-2.0) // you had this too low
    #define USER_MOTOR_MAX_CURRENT          (14.0) // you had this too high, need to keep to 14A or lower (probably 10.0A)
    #define USER_MOTOR_FLUX_EST_FREQ_Hz     (50.0) // you had this too low, should be ~10% of rated speed

     

    Please change these to these values:

    #define USER_IQ_FULL_SCALE_VOLTAGE_V      (32.0)
    #define USER_PWM_FREQ_kHz                (15.0)
    #define USER_R_OVER_L_EST_FREQ_Hz (100) 

     

    Either proj_lab02a/b or proj_lab02c should ID this motor correctly.  The Rs/Ls is low enough and flux is high enough that lab02a/b should work, but with a smaller Ls it may require 02c.

     

     

  • BTW - most of these are items I informed you of in my post on

    Apr 16 2014 15:13 PM

     

  • I agree, but I have had a lot of faults since then too. That sort of got me sidetracked and I had a phone conference on an LVDT we are working on which didn't help keep my thoughts collected.

    I did go back over your posts and cut & paste them all to a single sheet. Then printed them for ref.

    I am changing things now.

    Thank you.

    David

  • Made the changes. Then got this error  "USER_ErrorCode_ctrlFreq_Hz_Low" I slowly increased until I reached the value of 65. The motor now runs during the test in lab. Increasing didn't help past 65.

    Thanks for all your help.

    Guess I'll go on to the next lab.

    David

  • David,

    1. You haven't answered my questions I asked above. Please do so.

    2. If you got an error, you need to fix it.  "I slowly increased" (what did you increase? and how?) "until I reached a value of 65." (what a value of 65?)  "The motor now runs during the test in lab" (which proj_lab##?).

    This makes no sense. I have no idea what 65 means.

     

    The error you got should NOT happen if you updated the user.h you sent me as I stated. 

    The error code is produced (as can be seen in user.c) by these logic tests.

    As I told you to update the user.h your USER_CTRL_FREQ_Hz = 15000 so there is NO way this test can fail. You have made an error in updating your user.h or you are updating a different user.h then is being used in your project.

      if(((float_t)USER_CTRL_FREQ_Hz < USER_IQ_FULL_SCALE_FREQ_Hz) ||
    15000 < 800
        ((float_t)USER_CTRL_FREQ_Hz < USER_OFFSET_POLE_rps) ||
    15000 < 335.648
        ((float_t)USER_CTRL_FREQ_Hz < 250.0) ||
    15000 > 250
        ((float_t)USER_CTRL_FREQ_Hz <= (2.0 * USER_IQ_FULL_SCALE_FREQ_Hz * USER_MOTOR_MAX_CURRENT / (128.0 * USER_IQ_FULL_SCALE_CURRENT_A))))
    15000 <= 2 * 800 * 14 / (128 * 41.25)  <= 4.24
        {
          USER_setErrorCode(pUserParams, USER_ErrorCode_ctrlFreq_Hz_Low);
        }

      if((USER_MOTOR_Rs != 0.0) && (USER_MOTOR_Ls_d != 0.0) && (USER_MOTOR_Ls_q != 0.0))
        {
          if(((float_t)USER_CTRL_FREQ_Hz <= (USER_MOTOR_Rs / (USER_MOTOR_Ls_d + 1e-9))) ||
    15000 <= 0.034 / 0.00032 < 106.25
            ((float_t)USER_CTRL_FREQ_Hz <= (USER_MOTOR_Rs / (USER_MOTOR_Ls_q + 1e-9))))

    15000 <= 0.034 / 0.00032 >= 106.25
            {
             USER_setErrorCode(pUserParams, USER_ErrorCode_ctrlFreq_Hz_Low);  // comment out for the LV ACI attempt
            }
        }

  • Chris,

    Sorry I didn't make myself clear. I might add that customers are not all engineers. There are quite a few times when I didn't understand everything you have said, but I try to keep going, and I am trying to go through this without asking to many questions.

    I made the changes one by one. Per your email.  Here are some of them.

    "Please change these to these values:

    #define USER_IQ_FULL_SCALE_VOLTAGE_V      (32.0)
    #define USER_PWM_FREQ_kHz                (15.0)
    #define USER_R_OVER_L_EST_FREQ_Hz (100)  "

    When I changed "#define USER_PWM_FREQ_kHz” to  " (15.0)" I got the error  "USER_ErrorCode_ctrlFreq_Hz_Low" Since I had just changed that one I guessed that that was the one causing the error. So when I went back, I increased by 5's until the motor ran smoothly. Which was 65, to increase or decrease this number the motor actually didn't run at all

     

     


    This is from my user file.

    "#define USER_PWM_FREQ_kHz                (60.0) //30.0 Example, 8.0 - 30.0 KHz typical; 45-80 KHz may be required for very low inductance, high speed motors

    // changed USER_PWM_FREQ 80 TO 15 on 4/21/14  back to 50 motor does run better now"

    Then eventually 60.

    I have not looked for it to be sure but in the early parts of this manual I believe it never says anything about the motor running smoothly, it's all about test this copy that. While the motor grunts and groans I thought it was simply the program running, and testing, not that the motor should be running now. A lot is assumed by whom ever wrote this manual and a-lot isn't clear to someone just starting out with it.

    I appricate your help, I really do. do I do everything right.....I don't know, I'm just doing the best I can and day by day.

    Thanks Chris, do you need me to send my files? Did I do a better job of explaining?

    David

     

  • Dave,

    This one is my fault.

    When you change to
    #define USER_PWM_FREQ_kHz                (15.0)

    also change this one
    #define USER_NUM_PWM_TICKS_PER_ISR_TICK        (1)

    this will keep all the ADC, control/current, and EST at 15 KHz as well. With the previous setting of (3) it caused them to go to 5 KHz.

     

  • if you send me your motor I will get it running and send it back to you with the user.h and some screen shots, etc.....maybe that would help you the most?

  • Chris,

    There is no "your" fault. Mistakes are unfortunately a part of life and being human, my friend.

    I am just trying to get some education and a GUI for my co-workers. I expect if this goes well I will be able to do

    this many more times and expect to get quite good at it. Right now my co-workers are just waiting on a GUI.

    As I am writing this I stopped and read your next post. Gosh, I am impressed that you would be so kind as to offer this to me. Thank you.

    Please let me ask the boss if this is possible.

    May I get back to you in the morning?

    David

  • I get the impression that at this point the motor should be running close to top speed. Is this correct?

    I saw this too and your assumption is incorrect (as was mine).  The comment in the instructions should state, "at this point the motor should be able to be run close to top speed." 

    There is a variable in the watch window called gMotorVars.SpeedRef_krpm.  You'll notice it is approximately 0.1.  This is the speed commanded.  This is why your motor is only running 100 RPM.  If you change this to 1.0, your motor should run at 1000 RPM, 1.5 => 1500 RPM, 2.0 => 2000 RPM, etc.

    My comments above are only related to that one statement I quoted above and have nothing to do with the rest of the thread.  YMMV

  • Richard,

    Yes, I picked up on "gMotorVars.SpeedRef_krpm" but I didn't know the relationship 2.0 = 2K RPM.

    I'm glad to know that. I appreciate your response. Thanks.

    David

  • David,

    I unboxed your motor at 10:30am, and while on a conf. call have it all running perfectly fine at 11:04am  :)

    Super simple motor...not sure where we are getting wires crossed at.

    I use BOOSTXL-DRV8301 and LAUNCXL-F28027F

    #elif (USER_MOTOR == ELECTROCRAFT)
    #define USER_MOTOR_TYPE                 MOTOR_Type_Pm
    #define USER_MOTOR_NUM_POLE_PAIRS       (2)
    #define USER_MOTOR_Rr                   (NULL)
    #define USER_MOTOR_Rs                   (0.044)  // ID'd
    #define USER_MOTOR_Ls_d                 (0.000197)  // ID'd
    #define USER_MOTOR_Ls_q                 (USER_MOTOR_Ls_d)  // ID'd
    #define USER_MOTOR_RATED_FLUX           (0.056)  // ID'd
    #define USER_MOTOR_MAGNETIZING_CURRENT  (NULL)
    #define USER_MOTOR_RES_EST_CURRENT      (2.4)
    #define USER_MOTOR_IND_EST_CURRENT      (-2.4)
    #define USER_MOTOR_MAX_CURRENT          (14.0)
    #define USER_MOTOR_FLUX_EST_FREQ_Hz     (30.0)

    It runs ok at 1 Hz.

    You need to increase the Speed gains to get it to work best. I tuned at zero speed and am using Kp = 25 and Ik = 0.08 for pretty stiff control

    I'm only using 18V bus (so with 24V you should get 25% higher speeds) and it will run to

    Modulation 1.0

    Modulation 1.15


    should be able to hit 6800 RPM with 24V

    Modulation 1.333

    should be able to hit 7200 with 24V

     

    You can run reasonably fast speed reversals, but watch the Bemf voltage generated, I pushed over the 26V limit to the BOOSTXL-DRV8301 and caused a fault when I tried to reverse at 4000 RPM/s^2.  So for this motor I'd design your own inverter to suppor about 32V if you want to run in normal operating range. If you decide to do deep field weakening you may need more voltage range, it looks like 36V should suffice.

     

    proj_lab10a.out is attached. This works for the HW I used. I'll post the user.h in the next post and you can use that as required if you need to run on other HW (looks like you do need to use DRV8301-69M-KIT for the 25A rating of this motor).  Do you need me to build a .out for DRV8301 EVM + 69M ?

     

     

    proj_lab10a.out
  • this is user.h used for

    C:\ti\motorware\motorware_1_01_00_12\sw\solutions\instaspin_foc\boards\boostxldrv8301_revB\f28x\f2802xF\src\

     

    user.h
  • "Do you need me to build a .out for DRV8301 EVM + 69M ?"

    Yes, please do that.

    WoW ! 30min. What can I say?

    Your're good

    Thanks,,

    David

  • I have been reading over the labs all morning.

    The engineer wants to drive the motor as hard as he can. He has it geared in two different projects differently, but one of them is 60:1. So he wants to drive it all out, slow and stop. Another project he wants to drive it all out, slow, stop then reverse.

    In reading the labs, not near finished. I am going back to lab 12, the engineer has an encoder connected to the motor, actually both motors. So I need to get up to speed on that as well.

    30 min. !!!!!!!!

    Thanks so much.

    David

  • I do have question about lab 12.

    It says the encoder is used for feedback for speed and angle. Does MotorWare MOTION have any option for using the encoder for position?

    David

  • 6237.proj_lab10c.out

    here is proj_lab10c.out (this is the FPU enabled version) and and user.h

    C:\ti\motorware\motorware_1_01_00_12\sw\solutions\instaspin_foc\boards\drv8301kit_revD\f28x\f2806xF\src

     

    I didn't run this one, but it built fine.....if you have issues I can pull out a DRV8301 EVM and verify with your motor.

    Remember to keep your OffsetRecalc enabled since the offsets saved in the user.h that are compiled don't match your HW.

    5050.user.h

     

  • Chris,

    Would it be possible to get a copy of the spintac position.h and the main pos h files, if they are available?

    I am trying to identify variables to enable the motor to run in reverse. From other posts on the forum I have identified "For reverse direction, set IqRef polarity same as speed when lsw = 1. Secondly, add 180 deg to estimated angle for reverse direction."

    I am on lab 13c.

    I know, what the heck am I thinking? And you have done so much, and I am thankful for all you have done. But I they are paying me and I have to produce something. Advice welcome.

    I have 8 errors I need to fill in values for.

    USER_SYSTEM_FRICTION

    USER_SYSTEM_BANDWIDTH_SCALE

    USER_SYSTEM_INERTIA

    USER_SYSTEM_FRICTION

    USER_SYSTEM_BANDWIDTH_SCALE

    USER_MOTOR_MAX_SPEED_KRPM

    USER_SYSTEM_INERTIA

    USER_MOTOR_ENCODER_LINES

     

    Thanks,

    David

  • David Hackenbracht1 said:

    I am trying to identify variables to enable the motor to run in reverse. From other posts on the forum I have identified "For reverse direction, set IqRef polarity same as speed when lsw = 1. Secondly, add 180 deg to estimated angle for reverse direction."

    The motor will run in reverse as-is.  I ran yours in full speed reversal no problem.

    This comment: "For reverse direction, set IqRef polarity same as speed when lsw = 1. Secondly, add 180 deg to estimated angle for reverse direction."

    Has NOTHING to do with MotorWare / InstaSPIN. You must have read a post on something from controlSUITE.

    I have made the comment that when running in Torque mode (proj_lab4 or 5a) that you need to set a speed reference that matches the sign of the torque reference, but in most recent MotorWare projects we built this into the projects 4 and 5a (when you set an Iq_Ref_A it sets appropriate speed value with sign).

     

    Regarding your file for InstaSPIN-MOTION

    MOTION labs start with proj_lab05c, and if you follow them in order you will read that you need to essentially copy the user.h file from instaspin_foc over to instaspin_motion, and add in the new USER variables (that your compiler shows you are missing).

    You can do this! 

    Copy your existing user.h I sent you to a new location, like your desktop. You will edit THIS file.

    Open the MOTION version of the user.h for the DRV8301 and 6xM

    C:\ti\motorware\motorware_1_01_00_12\sw\solutions\instaspin_motion\boards\drv8301kit_revD\f28x\f2806xM\src\user.h

    From the MOTION version note in the USER_MOTOR section that the motors have some new defines appended. 

    Copy these to the file you are editing, appended to the end of your motor define that you want to use with MOTION

    #define USER_MOTOR_ENCODER_LINES        (2000.0)
    #define USER_MOTOR_MAX_SPEED_KRPM       (3.0)
    #define USER_SYSTEM_INERTIA             (0.0190846324)
    #define USER_SYSTEM_FRICTION            (0.7974877954)

    and you will need to copy

    #define USER_SYSTEM_BANDWIDTH_SCALE    (1.0)

    Save this file and then copy/replace back into the MOTION location for user.h

    C:\ti\motorware\motorware_1_01_00_12\sw\solutions\instaspin_motion\boards\drv8301kit_revD\f28x\f2806xM\src\

    Then follow the proj_lab05c-5f and then proj_lab12 if you have a motor with encoder.

     

     

  • You are right on all counts.

    I will jump on it right now.

    Much Thanks,

    David