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.

PWM frequency for the HV Motor Control Kit

Other Parts Discussed in Thread: CONTROLSUITE

I am looking for the module in which the PWM frequency is set for the Sensorless 2833x project.

  • Recommend the Motor Control Primer

    SPRUGI6

    http://www.ti.com/litv/pdf/sprugi6

    3.1 answers your question

  • Chris,

    Thanks again for another fast reply, and another primer to read. .yet, I am still confused.

    When I look in the "Settings" file referenced in 3.1, I see system clock speed and ISR frequency but no PWM frequency.

    Are you saying that the ISR freq is the PWM freq?

    Will

  • Chris,

    Now I understand where you got the idea that PWM_Frequency is in the settings. . .This is true of MOST of the projects, just not mine.

    The good news is that now I know how to add it to my project.   Thanks again. . .

    Will

  • Chris,

    This line is in the HVMC_Sensorless.C  at line 197. . can I get an explanation from the author?

    // Initialize PWM module
        pwm1.PeriodMax = SYSTEM_FREQUENCY*1000000*T/2;  // Prescaler X1 (T1), ISR period = T x 1
        PWM_INIT_MACRO(pwm1)

  • Please see this in conjunction with the "HVPM_Sensorless-Settings.h", look for the pound define for the system clock frequency and ISR Frequency... in this case for delfino this is 150 implying 150Mhz... and 10 for 10Khz respectively,

    Now look at the SYSTEM_FREQUENCY*1000000 = 150M, these are the number of CPU clock ticks in a second,

    now looking at the definition of

    T = 0.001/ISR_FREQUENCY, this defines the time period in seconds of the ISR i.e. ISR_FREQUENCY in this case is 10Khz => 1/10Khz = 10e-4 sec

    Now is 1 seconds have 150M ticks

    10e-4 sec would have 150M * 10e-4 ticks,

    Hope this helps,

     

    regards

    Manish Bhardwaj

  • OK. . So that is where the PWM frequency is set?

  • Will,

    This defines the main Interrupt

    C:\ti\controlSUITE\development_kits\HVMotorCtrl+PfcKit_v1.5\HVPM_Sensorless\HVPM_Sensorless.c 

    // Enable PIE group 3 interrupt 1 for EPWM1_INT

        PieCtrlRegs.PIEIER3.bit.INTx1 = 1;

     

    // Enable CNT_zero interrupt using EPWM1 Time-base

        EPwm1Regs.ETSEL.bit.INTEN = 1;   // Enable EPWM1INT generation 

        EPwm1Regs.ETSEL.bit.INTSEL = 1;  // Enable interrupt CNT_zero event

        EPwm1Regs.ETPS.bit.INTPRD = 1;   // Generate interrupt on the 1st event

    EPwm1Regs.ETCLR.bit.INT = 1;     // Enable more interrupts

     

    // Enable CPU INT3 for EPWM1_INT:

    IER |= M_INT3;

    // Enable global Interrupts and higher priority real-time debug events:

    EINT;   // Enable Global interrupt INTM

    ERTM; // Enable Global realtime interrupt DBGM

    This defines the desired ISR loop frequency

      C:\ti\controlSUITE\development_kits\HVMotorCtrl+PfcKit_v1.5\HVPM_Sensorless\HVPM_Sensorless-Settings.h

    Line 52: // Define the ISR frequency (kHz)

    Line 53: #define ISR_FREQUENCY 10

     

    ISR loop frequency is used to generate the PWM period

      C:\ti\controlSUITE\development_kits\HVMotorCtrl+PfcKit_v1.5\HVPM_Sensorless\HVPM_Sensorless.c 

    Line 91: float32 T = 0.001/ISR_FREQUENCY;    // Samping period (sec), see parameter.h 

    Line 201:     pwm1.PeriodMax = SYSTEM_FREQUENCY*1000000*T/2;  // Prescaler X1 (T1), ISR period = T x 1 

     

  • I would like to push the ePWM to 125Khz.  According to the FOC document, the ISR needs  just under 1200 ticks to achieve FOC.

    1200 times 125khz. . .puts me right up against the upper limit of the 28335.  My control interface will require some head room.

    I wonder if there are some parts of the FOC that can be relegated to the "other" cycles. 

    I am sure that because my motor is running much more slowly than 125k RPS that I do not need to make every calculation in every ISR.

    This means that I really have 2 key questions:

    How long before the 28335 gets a boost in speed?  

    Has anyone played with running the FOC tasks in multiple ISR's, which are running at different speeds?

    AdvTHANXance

    Will

  • Will,

    Yes we have played with putting FOC tasks in multiple ISR's, we did this for PFC and motor integration project where PFC was running at 100Khz, and motor control 10Khz. To guarantee cycle by cycle execution of motor control and PFC we split the code into 5 portions and executed one at each PFC isr.

    There is an app note relating to this which can be found here

    http://focus.ti.com/lit/wp/spry135/spry135.pdf

    However I am not exactly sure about the 125Khz switching for the Motor this is very surprising to me? what type of motor are you trying to spin?

    When you are switching that fast you can enable your ISR to be triggered by alternate pWM's etc.. or the only problem then would be that your ADC sample(Assumimg FOC for PMSM and ACI) would be from the previous switching periods. and when you update the PWM values you update it based of values many cycle before. 

    Regards

    Manish Bhardwaj

     

  • Manish,

    I am running my PMSM.   The goal is to get this working on an 8 KVA motor, then move to an 80KVA motor, then to the 800 KVA motor.

    I will be experimenting with a new inverter as well.  I already have the 125Khrz IGBT's.

    One thing that I have learned is that the USB is not fast enough to run the IDE at the higher freq. 

    Thus I will be debugging at 10Khz then moving the higher speed with fewer points displayed.

    Will

     

     

     

  • Hi! that link is not working. Where can I find that document actually
  • install controlSUITE
  • Hi Victor,

    Here are some updated links for the PDFs. In General, if you google the literature number (i.e. spugi6a or spry135) you should get a link to the documents.

    www.ti.com/.../sprugi6a.pdf
    www.ti.com/.../spry135.pdf
  • Thanks I found that document before. but because it havent any section 3.4 or similar I thought it was a wrong document, them I realize that the link in the bottom of that document is in where I can find the entire information.