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.

In FOC, How does the Iq/Id is converted to Vq/Vd?

Other Parts Discussed in Thread: CONTROLSUITE, MOTORWARE

Hi everyone,

I found the section 12.8.2 of  spruhj1c.pdf explains how to covert Iq to Vq. There are two equation have been used in this conversation, Iq (R+DLs) = Vq-w(LsId+Ke), Id(R+DLs) = Vd + wLsIq, on page 321.

But the example code don't embody these term as above.  

Could you give me any hints? Thanks!

Eli

  • The use of I and V in this part of the FOC logic blocks is a bit confusing, but it's the way it's done in all the literature.

    In FOC feed forward the Vd and Vq terms are simply the correction control output from the Id and Iq PI controllers in the D/Q reference frame.

    It is only once you go through the inverse park that you change into the voltage vectors in alpha and beta, and the angle of the rotor for the rotating reference frame is taken into account.

  • Hi Master,

       Are these Vq and Vd terms necessary?  If I want to observe the current regulator's action during the debug of its gains, could you give me any advice? Thanks!

    Eli

  • certainly they are necessary as the output of the current controller PI regulators that are used as inputs to the IPARK.

    if you add "controller_obj" to your Expressions View you can view most of the inputs, internals, and outputs of the control system to monitor the regulators during debug.

     

  • Thanks! By the way,  I'm using the kit called TMDSHVMTRPFCKIT with F28035 (doesn't surpport instaSpin), and I don't find the correction terms of Vd and Vq. 

    If I want to observe the action of current regulator from other ways, such as oscilloscope...   is it feasible? Thanks!

  • jia,

    for the TMDSHVMTRPFCKIT see the documentation in controlSUITE at

    C:\ti\controlSUITE\development_kits\HVMotorCtrl+PfcKit_v2.1\HVPM_Enhanced_Sensorless_2803x\~Docs

    You'll notice the output terms of the PI controllers are called Q_out (out of the PI controller) = Qs (into the iPARK module) and D_out = Ds  (which makes more sense IMO).

    you can monitor these through the Expressions view

    ipark1.Ds = pi_id.Out;
    ipark1.Qs = pi_iq.Out;

  • Hi ChrisClearman ,

     

    Thanks for your reply. I found the code as you indication.

    // ------------------------------------------------------------------------------
    // Connect inputs of the INV_PARK module and call the inverse park trans. macro
    // ------------------------------------------------------------------------------
    ipark1.Ds = pi_id.Out;
    ipark1.Qs = pi_iq.Out;
    ipark1.Sine=park1.Sine;
    ipark1.Cosine=park1.Cosine;
    IPARK_MACRO(ipark1)

    I have a question. I think these equation miss the correction terms. So the equation should be :

    ipark1.Ds = pi_id.Out -wLsiq;

    ipark1.Qs = pi_iq.Out+w(Lsid+ke);

    Am I right?

    Thanks!

  • what correction are you trying to add?

    if you are trying to cross couple the Iq and Id terms this is typically done as an input into the control, not as an output of the PI controller.

    you certainly can't just add/subtract a value like this to a per unit control signal from the PI controller.

     

  • Hello,

        I read the file, spruhj1c.pdf, found these equation as below. 

        Iq (R+DLs) = Vq-w(LsId+Ke), Id(R+DLs) = Vd + wLsIq, in section 12.8.2" Coupling Between Q-Axis and D-Axis", on page 321.

        But  the example projects from the controlSUITE don't embody these equation as above. They just take the output of PI_macro of current as the Vd/Vq. In my opinion,  that omits something.

        I want to achieve the decoupling between the Iq and Id. 

       sorry, I can't attached any picture or file. otherwise, it will help me to express my idea.

    Eli

  • Hello Eli,

    Let me provide a brief history of our documentation process, and hopefully clear up some of the confusion.

    I finished the first draft of my10-part blog series on "Teaching Your PI Controller to Behave" at about the same time our InstaSPIN Users Guide was ready to be published.  Since InstaSPIN-FOC uses PI controllers which were designed using techniques very similar to what I discussed in my blog series, we decided to include my series in the Users Guide for instructional purposes.  However, there were topics I discussed in my series that were NOT implemented in the InstaSPIN-FOC code, such as current controller decoupling.  We decided to leave these topics in the Users Guide anyway, since we thought it would be instructive in helping our customers implement them on their own if they wanted to.  This was arguably a poor decision as it resulted in a lot of confusion as to what is and isn't in the actual code.  As you have correctly deduced, this feature is not currently included in the existing MotorWare code.  You should be able to use the block diagram I provided in my series to make your own decoupling structure,

    OR...

    We are currently researching what it will take to add this feature to MotorWare!  We believe we can tap into certain signals inside the FAST observer to dramatically simplify the calculations required to implement a decoupling structure.  Moreover, we believe that by using these signals, we can create a structure that is identical for PMSM, ACIM, and IPM motors.  If true, this represents yet another significant advantage that FAST can bring to your FOC design!

    Assuming everything goes as planned, I will have more to say about this on my blog site very soon.

    -Dave

  • Hello Dave,

        Thanks for your reply. I very appreciate that. I think I understand your expression.  Actually, I have read your Blog series, and found they are very similar with the user guide. :)

        OK, now I want to implement the decoupling as your instruction. But I have several question, could you give me any hint?

        Q1, you mentioned the unit of Ke is volts (peak, line-to-neutral) per electrical radian per second or Webers, right?  What is the unit of w  Hz or rad/s ?

        Q2, Thanks to  , I know I need to normalize these terms in pu. But  in the equation,  w and pi_xx.out have been normalized, I don't know how to normalize the Ke and Ls.  Or do I need to recover the pu to real value of voltage or  current?

        Q3, the Iq/Id in this equations, does it refers to the reference value of Iq/Id or the detected real value? 

        Best Regards

    Eli

         

       

  • Eli,

    I will try to answer your questions:

    Q1:  w is in rad/s.

    Q2:  All of the equations in my blog series utilize the real value of each variable, not normalized values.  However, in order for the decoupling network voltage outputs to be added appropriately to the PI outputs, they must be scaled with the same gain used to normalize the PI outputs.  The most intuitive way that I can suggest to do this is to convert all variable inputs into the decoupling network into unscaled real values, perform the calculations outlined in my block diagram to determine the real correction voltages, and then multiply these voltages by the same scale factor used to normalize the PI outputs.  So you have gain changes on the inputs and on the outputs.  You may want to distribute these scaling operations throughout the signal chain to prevent variable overflow during the calculations.

    Q3:  You should use the actual values of Iq and Id, NOT the commanded values.

    -Dave

  • Dave,

         Thank you very much. I think I improve the wave of Iq/Id by the decoupling. And as you said, the work of prevention overflow during the calculation is noticeable, it takes me some time.

        Best regards,  and hope you have a wonderful weekend!

    Eli