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.

Doubts about FOC control with F28035, Dual Motor Control Kiy and Matlab

Other Parts Discussed in Thread: TMS320F2812, TMS320F28335

Hello,

I'm working on creating a FOC control using Matlab and Simulink. You can see the model in the attachment. Then we will create a project from the FOC algorithm using CCS v3.3 and we'll run a PMSM connected to the Dual Motor Control Kit controlled by DSP28035 Control Card.

Now, in my model PWM signals are generated correctly. But the motor is not working properly. I'm working with 24V-400 BLY172S Anaheim Automation, the motor included in the kit.

Now I can build the project, but the motor rotates "in jumps". In other words, the motor rotates and stops several times per second, the motor rotation is not continuous.
Also, the motor does not rotate if the velocity is small (50 rpm, for example) and if I set up a high currents Ia and Ib and high speed (Ia = Ib = 0.5 and 1500 rpm, for example), the motor temperature increases and stops. All this does not happen with software provided for you, which runs directly in CCS v3.3. With this program the range of work for Ia, Ib and the speed is great and the motor runs smoothly but the motor runs in open loop (Level 1).

What is the problem? Maybe I need to use HRPWM? Is this fact related to the sample time?
(currently with a value of 2 ^ -15)?

I also wanted to know if there was any system that I can work in real time with the model variables. So, if I can modify the values of the currents Ia and Ib or motor speed in the model and, immediately, the motor adapts to these changes in real time, as your program.


Thanks in advance and sorry for my English,

Carlos

  • Which mode are you hoping to run the motor, sensored or sensorless? In any case, I think the following post might be useful for at least the low speed problem:

    http://e2e.ti.com/support/microcontrollers/tms320c2000_32-bit_real-time_mcus/f/171/p/52724/523919.aspx#523919

  • Hi,

    control is sensorless FOC, but for now I'm working with an open loop model.

    What could be the reason for the malfunction of the engine?

    Thanks for the information,

    Carlos


  • Carlos,

    There could be many issues (set-up, HW, settings, small missed item, etc)

    I would suggest starting with a known good Mathworks project. They have one for this specific kit. 

    c2000_expert@mathworks.com

    Should be able to help you.

     

  • Hi,

    I'm just creating my model from Matlab example of FOC control for DSP F28335. Also, I'm already in contact with Mathworks support for C2000 family.

    In any case, thanks for the help.

    Carlos

  • Dear,
     
    I am researcher and assistant lecturer. I work on control of the Induction Motors, Could you please help me and send:

    1- Specifications of experimental set up drive system ((TMS320F2812 or TMS320F28335) DSP board, IGBT’s Gate drivers TMDSHVMTRPFCKIT, ....), i need to know if i can greate the control system using matlab and then used and downloads or used on-line with the set up.
    2- Connection diagram of experimental set up (In  Detailed)
    3- Can (TMS320F2812 or  TMS320F28335DSP  board worked with matlab/simulink on line? (programming language is simulink).


    please replay me as possible as soon..

    Best Regards,

    Ahmed Diab
  • Hello,

    answering your questions:

    1. What do you want to know exactly? I am working with the Dual Motor Control and PFC Kit, F28035 and F28335 Control Cards, Code Composer Studio v3.3 and Matlab / Simulink (including library Sim Power Systems).
    Indeed, you can create a control algorithm using Matlab / Simulink and DSP specific blocks you use. Then you can use CCS v3.3 to generate the C code that represents the control algorithm and load it into the DSP. With this, I have implemented an algorithm FOC control for permanent magnet motor.

    2. What do you mean exactly? Perhaps I have answered the second question first.

    3. What do you mean exactly with "on line"? Perhaps you mean you want to work "real time"?


    In addition, you can find much information in the help of Matlab. For example, look in the section on the Embedded Targets.


    Carlos Camacho

    University of Barcelona

  • thanks Carlos Camacho

    I want to build the system, so i now want know what is the complet system diagram and which components do i buy?

    2- i want know which components need to buy?

     

    3- (on-line) as (real time). and i ask if the system worked with it or not?

    help me

    Ahmed

  • Ahmed,

    First of all, I appreciate you ask for help appropriately, without giving orders to all of us and sending the same message many times.

    Regarding your question:

    2. You need to purchase the following components:

    - Matlab 2011a or 2011b with the following libraries (# MATLAB, Simulink #, # Real-Time Workshop Embedded IDE Link #, # Target Support Package, # Real-Time Workshop Embedded Coder, # Fixed-Point Toolbox, Simulink Fixed #-Point and # SimPowerSystems)
    - The Texas Instruments kit you need depending on the type and the engine power. http://www.ti.com/lsds/ti/microcontroller/32-bit_c2000/tools.page # appkits
    - Code Composer Studio. In my experience, the best solution is to work with Windows XP and Code Composer Studio v3.3. Windows 7 may be incompatible with CCS v3.3 and CCS v4.x is too new for many Matlab applications.

    3. Matlab has a system to work in "near real-time" called External Mode. In addition, Matlab has two systems to capture signals from the DSP called SCI and CAN.

    You can find useful tutorials on how to make the connection between Matlab, CCS and DSP, and also on systems CAN, SCI and Extrernal Mode in Matlab help:

    Matlab Help -> Simulink Coder -> Demos -> Embedded Targets -> Texas Instruments C2000 -> Motor Control

    Carlos Camacho
    University of Barcelona

  • thanks, Carlos

    and it no order and see my words (help me)

    same message many times because it is very important and i want answer

    thanks

    ahmed

  • Ahmed,

    I hope I have helped you. You can ask me any questions you have.

    regards,

    Carlos Camacho
    University of Barcelona

  • Dear Carlos Camacho;

    please send  me this matlab/simulink file and if you did ADC for read currents of the motor!

    engahmedz@yahoo.com.

    thanks

    yours

    ahmed

  • Hi Carlos,

    Please look into the following file exchange, it contains a video that should give you a lot of information for your dual motor control project:

    http://www.mathworks.com/matlabcentral/fileexchange/49109-dual-motor-control-with-ti-f28069-launchpad

    I hope it helps,

    Antonin @ MathWorks