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.

how to convert from real-value scaling to PU scaling for ki and kp

Other Parts Discussed in Thread: MOTORWARE

Hi 

I confused about how to convert from real-value scaling to PU scaling for Ki , Kp , spdKp , spdKi? Can you tell me in more detail ?

how can i get the expression : Ki(PU)=Ki*Iscale/Vscale     where:  Iscale  is the actual current value corresponding 1.0

                                                                                                              Vscale is the actual voltage value corresponding to 1.0

Kp(PU)=Kp*T               where:  T corresponds to the sampling period of the current loop.

if the motor model expression in PU?

thanks

  • Hello Rock Meng,

    I will try to explain how the scaling values are calculated.

    The reason we must scale the PI coefficients is because the the inputs and outputs are scaled "Per Unit".  For example, let's consider the input to the PI current regulator.  The real current value is converted to a per unit value between -1 and +1 by dividing it by the maximum current value.  i.e.,

    Iscaled = Ireal/Imax

    The output of the PI current regulator is also scaled between -1 and +1.  The inverter converts this scaled output voltage to real voltage by multiplying it by the maximum voltage.  i.e.,

    Vreal = Vscaled*Vmax

    So, the input gain changes by 1/Imax and the output gain changes by Vmax.  The composite gain change for the PI controller signal path is therefore Vmax/Imax.

    However, if we change the gain for the PI signal path, we also change the tuning.  To correct this, we need to find some other place in the signal path where we can multiply by one over this gain change.  In a series PI controller (like what we use in InstaSPIN for the current regulator), the P term is in series with the entire PI signal path.  So we correct for the gain change by multiplying P by one over the gain change, i.e.,

    Kp(PU) = Kp*Imax/Vmax

    Since this completely corrects for the PU scaling, no additional scaling is required for the Ki term.  However, the way that we implement the Ki gain in InstaSPIN, the T term (which is really part of the digital integrator) is lumped with the Ki term.  This is technically innacurate and somewhat confusing, but it reduces the number of math operations required to implement the integrator code.  So,

    Ki(PU) = Ki*T

    This same process can be used to understand the scaling values for the speed PI controller.

    Best Regards,

    Dave

     

     

     

  • Dear Dave,

    Thank for your explaination above. But I was still confuse about scalling technique when I have worked with designing a control system on Matlab/Simulink with full floating point support. I saw each control module in Motorware which is designed to work with PU value, so how do I convert a floating-point algorithm or equation in order to implement with fixed point system?

    Please make a video or presentation to explain why and how must scale parameters in case using a fix-point DSP.

    Thank you in advance,
    Tran
  • Hi Tran,

    Have you seen the IQmath wiki?  

    See the intro below to IQmath, a convenient method to going between float and fixed, with control over fractional precision and integer range.

    Jeff

    Introduction to IQmath for C28x MCUs

    Texas Instruments TMS320C28x IQmath Library is collection of highly optimized and high precision mathematical Function Library for C/C++ programmers to seamlessly port the floating-point algorithm into fixed point code on TMS320C28x devices.

    IQmath uses the internal hardware of the C28x in the most efficient way to operate with 32bit fixed-point numbers. Taking into account that all process data usually do not exceed a resolution of 16 bits, the library gives enough headroom for advanced numerical calculations.

    These routines are typically used in computationally intensive real-time applications where optimal execution speed & high accuracy is critical. By using these routines you can achieve execution speeds considerable faster than equivalent code written in standard ANSI C language. In addition, by providing ready-to-use high precision functions, TI IQmath library can shorten significantly your DSP application development time.