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.

Vs Scaling Factor

Other Parts Discussed in Thread: MOTORWARE

Hello,

We are using Instaspin to run an IPM motor. My question is very simple: Vs, Vd and Vq are displayed in the gMotorVars structure in per unit. But, what is the scale factor? In other word, what value do I have to multiply by to get the value in Volts.

In the case of Id and Iq that scaling factor was USER_IQ_FULL_SCALE_CURRENT_A so I thought that for Vs, Vd and Vq it would be USER_IQ_FULL_SCALE_VOLTAGE_V but it doesn't seem to be that way because I am getting ridiculosly high values.

Thanks in advance,

Javier

  • sorry, this one slipped through the cracks.

    thesee are IQ24 values so you have to use IQmpy function. Otherwise, results will be scaled by 2^24.

    Vq_V = _IQmpy(Vq_pu,_IQ(USER_IQ_FULL_SCALE_VOLTAGE_V));
  • Hi Chris,

    I have already tried that and the values I get are way to high. For example, I have just done one test with very low voltage: 35V, 200 rpm and the values I get are:

    Vd : -40V

    Vq: 1150 V

    If I reduce the speed to 100 rpm those values get reduced by half aproximately. On the other hand running at 200 rpm if I double the DC voltage to 70 V Vd and Vq get as well reduced by half aproximately so it looks like the value is dependent on the DC Bus Voltage. 

    I have done several tests and I have checked that the per unit value of Vs gets close to 1.33 (I am running with overmodulation set to 1.33) it is when the inverter runs out of volts meaning that it happens when you reach the maximum speed you can run at for that voltage. That would mean that the scaling factor you need to multiply by to get volts would be the current DC bus voltage value.

    I don't know if I am doing something wrong. I have attached the user.h file so that you can check if everything is ok. 

    I am running sensored Instaspin with motorware 15 and the motor I am using is quite a high current one, therefore I had to scale all the current parameters from Amps to kiloAmps.

    74150.user.h

  • Hi Javier,

    The scale factor is used to transfer pu current/voltage value to actual amps/volts. You can't display right value because the voltage/current scale value is bigger than the integer of IQ24 which should be less than 127. So there are two methods to display correct value, 1. you can use IQ20 as global IQ to enable the USER_IQ_FULL_SCALE_CURRENT_A is less than the integer of IQN (N=20). Or you can refer to below code to get the correct value of current/voltage using kA/kV units.

      // read Vd and Vq vectors per kilo volts
      gMotorVars.Vd_kV = _IQmpy(CTRL_getVd_out_pu(ctrlHandle), _IQ(USER_IQ_FULL_SCALE_VOLTAGE_V/1000.0));
      gMotorVars.Vq_kV = _IQmpy(CTRL_getVq_out_pu(ctrlHandle), _IQ(USER_IQ_FULL_SCALE_VOLTAGE_V/1000.0));

      // calculate vector Vs in per kilo volts
      gMotorVars.Vs_kV = _IQsqrt(_IQmpy(gMotorVars.Vd_kV, gMotorVars.Vd_kV) + _IQmpy(gMotorVars.Vq_kV, gMotorVars.Vq_kV));

      // read Id and Iq vectors in kilo amps
      gMotorVars.Id_kA = _IQmpy(CTRL_getId_in_pu(ctrlHandle), _IQ(USER_IQ_FULL_SCALE_CURRENT_A/1000.0));
      gMotorVars.Iq_kA = _IQmpy(CTRL_getIq_in_pu(ctrlHandle), _IQ(USER_IQ_FULL_SCALE_CURRENT_A/1000.0));

      // calculate vector Is in kilo amps
      gMotorVars.Is_kA = _IQsqrt(_IQmpy(gMotorVars.Id_kA, gMotorVars.Id_kA) + _IQmpy(gMotorVars.Iq_kA, gMotorVars.Iq_kA));

      // Get the DC buss voltage in kilo volts
      gMotorVars.VdcBus_kV = _IQmpy(gAdcData.dcBus,_IQ(USER_IQ_FULL_SCALE_VOLTAGE_V/1000.0));

    Best Regards,

    Yanming Luo

  • Hi Yanming,

    Thanks for your suggestions. I had already done that for the current and the DC Bus voltage but I completely forgot about doing it in the Vd, Vq and Vs voltages. Having said that, I tried it and it still doesn't work, I get the same values as before (since I was doing the tests with less than 100 V the IQ was not overflowing).

    As I said in my previous posts, even if I look at the per unit values, I see that those values get close to 1.33 (since I am using overmodulation) when the motor reaches the maximum speed it can run at for a particular voltage, if that happened for the nominal voltage that would be alright because the displayed values would be correct, but it happens for any voltage. If I run the motor with only 50V, lets say, I already see values in Vq and Vs close to 1.33 (in per unit) when the motor is running at 500rpm (maximum it can run for that voltage). Making use of what you just said I get voltage values in the range of 1000-1500 V (1-1.5 kV) which of course doesn't make any sense. Also, as I said before, I have noticed that the values change varying the DC bus voltage. Lets say in the previous case now I double the DC bus voltage to 100V (without varying the speed), then the Vq and Vs values get divided by two (to 500-750 V) which doesn't make much sense taking into account that if I am running at a fixed speed, the voltage applied (average) should not change (otherwise the motor would speed up or slow down).

    Are you sure that is the scaling factor for the Vd, Vq and Vs voltages? From the tests I have performed it looks like the scaling factor for those variables is the DC bus voltage, which looks a bit strange to me because it can vary over time.

    Any idea of what is happening?

  • Hi Javier,

    The unit of Vd,Vq and Vs is a DUTY, not PU value scaled by Voltage. So you need to use the following equation to get real Voltage unit.

    Vd_V =  Vd * Vdc/2

    Vq_V = Vd * Vdc/2

    You can refer to the below my sample code. For convenience, I used kV unit to keep IQ24 range since your system volate is around 1kV.

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

      gMotorVars.VdcBus_kV = _IQmpy(gAdcData.dcBus,_IQ(USER_IQ_FULL_SCALE_VOLTAGE_V/1000.0));

      gMotorVars.Vd_kV = _IQmpy(CTRL_getVd_out_pu(ctrlHandle),gMotorVars.VdcBus_kV>>1);
      gMotorVars.Vq_kV = _IQmpy(CTRL_getVq_out_pu(ctrlHandle),gMotorVars.VdcBus_kV>>1);

      gMotorVars.Vs_kV = _IQsqrt(_IQmpy(gMotorVars.Vd_kV, gMotorVars.Vd_kV) + _IQmpy(gMotorVars.Vq_kV, gMotorVars.Vq_kV));

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

     For reference, If you are using MW 15 and above, you should multiply VDC instead of VDC/2 at above equation because the output range of SVGEN was changed from +-1.0 to +-0.5.

    Thanks,

    Steve

  • Hi Javier,

    Actually, the scaling factor for the Vd, Vq and Vs voltages is not  _IQ(USER_IQ_FULL_SCALE_VOLTAGE_V/1000.0). The Vd, Vq, and Vs from CTRL module is the ration of per VdcBus, so you can use below code to get the real voltage for display.

      // read Vd and Vq vectors per kilo volts

      gMotorVars.Vd = CTRL_getVd_out_pu(ctrlHandle);
      gMotorVars.Vq = CTRL_getVq_out_pu(ctrlHandle);

     // calculate vector Vs in per kilo volts
      gMotorVars.Vs = _IQsqrt(_IQmpy(gMotorVars.Vd, gMotorVars.Vd) + _IQmpy(gMotorVars.Vq, gMotorVars.Vq));

      // Get the DC buss voltage in kilo volts
      gMotorVars.VdcBus_kV = _IQmpy(gAdcData.dcBus,_IQ(USER_IQ_FULL_SCALE_VOLTAGE_V/1000.0));

    // calculate the voltage transfer coefficient

      gMotorVars.Vs_kV_sf = _IQmpy(gMotorVars.VdcBus_kV, _IQ(0.8666));          // 0.8666=SQRT(3)/2

      // Get the Vd, Vq in kilo volts
      gMotorVars.Vd_kV = _IQmpy(gMotorVars.Vd, gMotorVars.Vs_kV_sf);
      gMotorVars.Vq_kV = _IQmpy(gMotorVars.Vq, gMotorVars.Vs_kV_sf);

      // Get the Vs in kilo volts
      gMotorVars.Vs_kV =  _IQmpy(gMotorVars.Vs, gMotorVars.Vs_kV_sf);

    Best Regards,

    Yanming Luo

  • Hi Yanming,

    That makes much more sense, now the values I get are within the expected values.

    Just one more question. The IQ(0.8666) value would vary depending on wether or not I am using overmodulation? In other words, is it related to the parameter USER_MAX_VS_MAG_PU?

    Thanks,