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.

Difficulties running at moderately high speed

Other Parts Discussed in Thread: DRV8301, MOTORWARE

Hi all,

I'm having some difficulties running instaspin-foc at moderately (~1 kHz) speeds; above around 800Hz the current controller requires a very high setpoint current to increase the (unloaded) motor, the motor speed rapidly increases to 1100Hz, and the motor speed reported by FAST decreases to around 750Hz.  I'm using a custom hardware platform, fairly similar to the DRV8301 high current kit. I've set up instaspin with the following settings;

IQ_FS_FREQ_Hz; 2000

IQ_FS_VOLT_V; 80

ADC_FS_VOLT_V; 68

IQ_FS_CURRENT_A; 700

ADC_FS_CURRENT_A; 330 (aiming for peak motor currents of around +-120A)

NUM_CURRENT_SENSORS; 3

SYS_FREQ; 90 MHz

PWM_FREQ; 60 kHz

MAX_DUTY_CYCLE;  1.309401076758503

NUM_PWM_TICKS_PER_ISR_TICK; 3

ISR ticker per CTRL/CURRENT/EST tick; 1

CTRL ticks per SPEED/TRAJ tick; 20

VOLT_FILTER_POLE_Hz; 328

From what I've been able to determine this seems like a reasonable set-up, with FAST running at 20kHz and a maximum electrical motor frequency of 1/10'th of this (in practice I'm expecting to, at most, go to around 1400Hz).

The motor I'm using is a relatively generic low-inductance hobby PMSM motor with identified parameters of Rs = 9mR, Ls = 10uH, flux = 0.016VpHz, and 7 pole pairs. I'm running at a DC bus voltage of 30V for now, which would suggest that I would be able to achieve around at least ~1440Hz.

For testing purposes I'm using a very soft, purely proportional, controller with a mechanically unloaded motor. (I have performed the same tests with a torque-mode controller and arrived to the same results.)The table below summarizes some simple measurements performed. At speeds below 780Hz instaspin functions as expected, this behaviour is only apparent at these speeds. As the setpoint increases the speed reported by FAST starts to differ (and is less than) the actual speed as measured with an external tachometer. When commanding a speed of 875Hz, the motor speed rapidly increases up to 1100Hz, while the speed reported by FAST *decreases* (which leads to an increased output from the P controller).

Setpoint speed [Hz] Speed reported by FAST [Hz] Externally measured motor speed [Hz] Setpoint Iq current
787 770 770 2.1
815 793 830 2.1
845 816 885 2.1
875 816 1108 4.5

If anyone could shed some light on this I'd appreciate it greatly; I believe I've set up instaspin to work at these relatively moderate speeds, but clearly something has eluded me. For what it's worth, I am using the default current controller PI gains, defined as;

calcPIgains(){
    ...
    _iq Kp_Id = _IQ((0.25*Ls_d*fullScaleCurrent)/(ctrlPeriod_sec*fullScaleVoltage));
    _iq Ki_Id = _IQ(RoverLs_d*ctrlPeriod_sec);
    _iq Kp_Iq = _IQ((0.25*Ls_q*fullScaleCurrent)/(ctrlPeriod_sec*fullScaleVoltage));
    _iq Ki_Iq = _IQ(RoverLs_q*ctrlPeriod_sec);
    ...
}

and

CTRL_recalcKpKi(){
    ...
      _iq Kp = _IQ(0.05*Lhf*USER_IQ_FULL_SCALE_CURRENT_A/(USER_CTRL_PERIOD_sec*USER_IQ_FULL_SCALE_VOLTAGE_V));
      _iq Ki = _IQ(RhfoverLhf*USER_CTRL_PERIOD_sec);
      _iq Kp_spd = _IQ(0.005*USER_IQ_FULL_SCALE_FREQ_Hz*gUserParams.maxCurrent/USER_IQ_FULL_SCALE_CURRENT_A);
    ...
}

  • Jonathan,

    Please post the Parameters ID'd

    couple comments

    1. What sort of current does this pull unloaded at high speeds? If less than 40A perhaps you can verify operation with the DRV8301 board to see if you can trace this back to something in your hardware.

    2. IQ_FS_CURRENT_A; 700 is much too high. You should set this as just < 1/2 the ADC_CURRENT value, so something like 170A should be plenty. You are losing resolution with 700A here.

    3. IQ_FS_VOLT_V; 80 is too high. With your flux you will only be generating 24V @ 1500 RPM; lower this to 30V to maximize your resolution.

    4. Please set MAX_DUTY_CYCLE to (1.0); you'll notice in MotorWare _10 on Thursday that we have changed the name of this variable and it should always be set to (1.0) in the user.h file; you will only change the max duty cycle using the set functions that are shown in lab 10a

    5. Is this a typo? CTRL ticks per SPEED/TRAJ tick; 20....I would suggest for your 60 KHz PWM the following:

    #define USER_NUM_PWM_TICKS_PER_ISR_TICK (3)

    #define USER_NUM_ISR_TICKS_PER_CTRL_TICK (1) // 

    #define USER_NUM_CTRL_TICKS_PER_CURRENT_TICK (1) // 

    #define USER_NUM_CTRL_TICKS_PER_EST_TICK (2) // 

    #define USER_NUM_CTRL_TICKS_PER_SPEED_TICK (20) // 

    #define USER_NUM_CTRL_TICKS_PER_TRAJ_TICK (20)


    6. For your current control gains, I would multiply the Kp values by 4. This will take away the *0.25 that we add to initially soften the controller. This tighter current control will be needed at higher speeds.

    7. Your R and L values suggest that this motor should only be able to do about 900 Hz, which is where you are seeing problems. Are you sure this motor can go as fast as you think?  If the motor ID is correct I would suggest that it will not....

  • HI Chris:

        my motor is identified with Rs=0.2666253 and Ls_d = Ls_q = 0.001559172, Rated flux 0.2705697, It is to say that my motor can run about RoverL = 0.2666253 / 0.001559172 = 171Hz?  What can be infoed though RoverL?

  • Please post the Parameters ID'd

    I'm assuming you mean the results from a motor identification? If so, I've run an identification with;
    R/L_f = 300Hz
    Rs est current = 10A
    Ls est current = 10A
    Imax = 15A
    Flux estimation frequency = 40Hz
    (The motor I'm using has a cogging torque of around 5A)
    This results in the identified motor parameters (which for Rs and Ls vary around 20% from identification to identification);
    Rs = 9.3mR
    Ls = 8.5uH
    Flux = 0.0165

    During normal operation I calibrate the sensor offsets on startup but don't perform an Rs re-estimation.

    1. What sort of current does this pull unloaded at high speeds? If less than 40A perhaps you can verify operation with the DRV8301 board to see if you can trace this back to something in your hardware.

    Unloaded, the motor only draws around 2 - 2.5A (at ~6000 RPM / ~800 Hz), so if things continue to be problematic I'll try this out on the dev-kit.

    2. IQ_FS_CURRENT_A; 700 is much too high. You should set this as just < 1/2 the ADC_CURRENT value, so something like 170A should be plenty. You are losing resolution with 700A here.

    That seems far more reasonable -- when I was originally setting up these values I misinterpreted the guideline (pg. 118 in SPRUHJ1B) for (IQ_FS_CURR_A * 2) >= ADC_FS_CURR_A by a factor of two. Thanks for the sanity-check.

    3. IQ_FS_VOLT_V; 80 is too high. With your flux you will only be generating 24V @ 1500 RPM; lower this to 30V to maximize your resolution.

    I'd rather not lower it as far as 30V; I'll potentially use another motor in the future with a higher flux. However, I know that I'll never use field weakening, nor will the bus voltage exceed 45V, so would a value of around 50V seem reasonable?

    4. Please set MAX_DUTY_CYCLE to (1.0); you'll notice in MotorWare _10 on Thursday that we have changed the name of this variable and it should always be set to (1.0) in the user.h file; you will only change the max duty cycle using the set functions that are shown in lab 10a

    Done.

    5. Is this a typo? CTRL ticks per SPEED/TRAJ tick; 20....I would suggest for your 60 KHz PWM the following:

    #define USER_NUM_PWM_TICKS_PER_ISR_TICK (3)

    #define USER_NUM_ISR_TICKS_PER_CTRL_TICK (1) // 

    #define USER_NUM_CTRL_TICKS_PER_CURRENT_TICK (1) // 

    #define USER_NUM_CTRL_TICKS_PER_EST_TICK (2) // 

    #define USER_NUM_CTRL_TICKS_PER_SPEED_TICK (20) // 

    #define USER_NUM_CTRL_TICKS_PER_TRAJ_TICK (20)

    As far as I understand what you've proposed would only change the FAST estimator to run at 10kHz, from the 20kHz I've used previously? I've monitored the execution time of the entire mainISR routine and it seems very stable at around 70% of the calling period; when I'm approaching a motor speed of 1500Hz I would have assumed that a FAST estimator frequency of 20kHz would be suitable. (?)

    I am using a decimation rate of 20 for CTRL ticks per SPEED/TRAJ; which gives a 1kHz speed and current loop frequency, which I believed would be sufficient?

    6. For your current control gains, I would multiply the Kp values by 4. This will take away the *0.25 that we add to initially soften the controller. This tighter current control will be needed at higher speeds.

    Done.

    7. Your R and L values suggest that this motor should only be able to do about 900 Hz, which is where you are seeing problems. Are you sure this motor can go as fast as you think?  If the motor ID is correct I would suggest that it will not....

    Hmm, I'm aware that at speeds of around 900Hz the motor will start becoming more difficult to control, but my impression was that with a suitably high bus voltage I would be able to drive the desired motor currents regardless of this. Is this a limitation of FAST; that the rotor position cannot be estimated at speeds above the R/L pole?

    I'll start doing some more testing now and will shortly add the results of these tests. Thank you for replying so quickly.

  • Minor update; I've checked the values generated by CTRL_recalcKpKi and calcPIgains; 

    CTRL_recalcKpKi
    Lhf; 6.351 uH
    Rhf; 10.852 mR
    RoverL; 1708
    Kp; 0.086379584
    Ki; 0.0854302
    Kp_spd; 3.529411808

    calcPIgains;
    Kp_Id; 0.590017
    Kp_Iq; 0.590017
    Ki_Id; 0.053547
    Ki_Iq; 0.053547

    Is it noteworthy that LHF is some 40% below the estimated inductance? Additionally, is it noteworthy that the gains generated by CTRL_recalcKpKi and calcPIgains are *very* different?

    During normal operation it seems the values generated by calcPIgains are used. (Checked with the CTRL_getKp/Ki functions).

  • Ok Chris, I think I've started to approach the issue. One strange effect that I've noticed is that with in *increased* USER_IQ_FULL_SCALE_FREQ_Hz the "critical speed" -- the speed where FAST stops reporting the actual motor speed correctly -- *decreases*. As it is now, with a FS_FREQ_Hz of 1500 I can reach speeds of around 1100Hz, which is close enough to my desired top speed for me to be happy.

    That said, I am concerned about the inverse behavior; is it possible that at high speeds nearly the entire dynamic range of the IQ24 data type is being used, with only a very small headroom that is gained by decreasing FS_FREQ_Hz? I'm somewhat worried about spurious strange/bad behavior...

    //Jonathan

  • Minjian,

    Yes, Rs / Ls gives you a theoretical maximum Hz for your motor. It's good to look at this value to understand if your motor is designed for the speed you are expecting.

    The other "sanity check" is Flux (in V/Hz) / 2pi (to convert to Webers) / Ls = Short Circuit current. This gives you a general idea of the current capability of the motor.  So for yours that is an Isc = ~27A

  • Jonathan,

    Going through all of your posts

    Rs est current = 10A
    Ls est current = -10A

    CC: these are way too high. ~10% of the current during full load, and usually just enough to get over the cogging torque during unloaded motor ID.  You stated it takes 5A to start up, so use (5.0) and (-5.0) for motor ID, but I would suggest even lowering these further once ID'd so that if you do an Rs Recal you aren't over heating the wires and getting a bad Rs value. You say later in your post it only draws 2A at unloaded speed, so I would use your Rs value you find with 2A of injection.

    Imax = 15A

    CC: Why 15A max? Just for some initial safety?  This is limiting the output of your speed PI controller to request only 15A of Iq from the torque controller. This certainly could be limiting your motor during testing. (although if unloaded you only draw 2A this isn't effecting you)

    Flux estimation frequency = 40Hz

    CC: Increase this to 10%.  Say 150 Hz to get a more consistent Ls value. BTW, your Ls is very small, I assume you are only using Lab 2c to identify correctly?

    3. There is no reason to ever have your IQ_V greater than your ADC_V unless you have a large Flux where Flux * Max Hz > ADC_V.  Lower this to at least (68) and I would recommend more like (40), but (50) is ok.

    5. You don't need to run FAST at 20 KHz, it's overkill.  But, if you want to use the MIPS, that's fine.  You could run everything just fine at 15 KHz, but I understand if you are using 60 kHz PWM it's easier to just use the (3).

    CC: The R/L is not a limitation of FAST, it is a limitation of the motor design. First, I'm not sure you have the correct R and L values for your motor. Please re-ID using my suggestions.  My yes, if your R/L is ~1000, you will NEVER be able to run this motor with the expected voltage bus to 1500 Hz.  You can increase the Bus Voltage (possibly damaging your motor) or use Field Weakening, but R/L is a machine design limitation for motors.

    Regarding your last post and the inverse relationship:

    CC: I believe you will see more stable results by updating your Voltage filters (HW & SW setting) to use a cross over frequency of your IQ_Hz / 4.  So if you want to use (2000) design the filter for 500 Hz. This is something that we are still investigating as we try higher speed motors, but this /4 has had consistent results. 

    But I still think you are hitting the limit of your motor design...



  • Thanks a lot! with field weakening we can exceed this maximum motor freq or not? Isc is the max amplitude of the phase current? is there some waveform of dc-bus current,in our exprement, we find it is hard to measure the correct dc-bus current compared with external analog current-meter,is there any suggestion? ben
  • Typically you can get more speed using field weakening, but it depends on the motor. Motors with large flux will allow more field weakening, as you have more starting Bemf to reduce.  Many high speed motors have small flux to begin with, so field weakening may not buy you much.

    Isc gives you an idea of the current capability of the motor, and the potential switching current / ripple.  It's not the same as the current required to reach rated torque.

    Not sure I understand your last question completely. A current probe is the best tool to use.

    You can also buffer the current samples in software and use CCS to plot the values. It does a reasonable job.

  • Hi Chris:

    What 's the relationship between Rs/Ld/Lq and the motor stator winding's resistance R and inductance L. Can we measure the stator's resistance and inductance and then calculate out the Rs and Ld / Lq (For PSMS motor)

    Ben

  • Hi Chris:

        We use three phase current measurement shunt resistance, and then connect together to DC_Bus ground through another shunt resistance (DC bus current shunt resistance?) to measure the DC_Bus current, We need to know the whole electronic power input (DC bus vol * DC bus current?) , and then we can set a threshold to ensure that the power consumption by the motor will not exceed. Currently we use a analog current meter serially connected in the DC bus, for example, if it is display 1A, with DC bus voltage 310V, We will know it consume about 310W power, High the speed, it will be 2A, and consume 620W. Now we want to measure the DC-Bus current (average)  through a  shunt resistance to determine the power consumption. Any suggestion to achieve that?

  • Going through all of your posts

    Rs est current = 10A
    Ls est current = -10A

    CC: these are way too high. ~10% of the current during full load, and usually just enough to get over the cogging torque during unloaded motor ID.  You stated it takes 5A to start up, so use (5.0) and (-5.0) for motor ID, but I would suggest even lowering these further once ID'd so that if you do an Rs Recal you aren't over heating the wires and getting a bad Rs value. You say later in your post it only draws 2A at unloaded speed, so I would use your Rs value you find with 2A of injection.

    I can easily use lower currents when performing an identification; would it be beneficial to use around 3A, and manually help the rotor get started? My naive assumption is that a higher current will increase the accuracy of the idenfication, as there are more bits used in the current input. With an identification current of 5A I'm only effectively using log2(5/ADC_FS_CURR*2^12) = log2(5/330*2^12) ~ 6 bits of resolution... Of course, I really have no idea of how the estimation procedure works and how sensitive it is to error in the current measurement... Any pointers?

    Imax = 15A

    CC: Why 15A max? Just for some initial safety?  This is limiting the output of your speed PI controller to request only 15A of Iq from the torque controller. This certainly could be limiting your motor during testing. (although if unloaded you only draw 2A this isn't effecting you)

    This is a limit solely used for the motor identification, during normal operation a different limit of around 120A is applied. (I'm updating the gUserParams struct before starting the identification/normal operation, seeding new values, and then loading the paramters into the insta-spin subsystem).

    Flux estimation frequency = 40Hz

    CC: Increase this to 10%.  Say 150 Hz to get a more consistent Ls value. BTW, your Ls is very small, I assume you are only using Lab 2c to identify correctly?

    Ok, I'll be sure to stick to around 10% of full speed. And yes, I've based my project on the reference material in lab 2c.

    3. There is no reason to ever have your IQ_V greater than your ADC_V unless you have a large Flux where Flux * Max Hz > ADC_V.  Lower this to at least (68) and I would recommend more like (40), but (50) is ok.

    Ok!

    5. You don't need to run FAST at 20 KHz, it's overkill.  But, if you want to use the MIPS, that's fine.  You could run everything just fine at 15 KHz, but I understand if you are using 60 kHz PWM it's easier to just use the (3).

    Well, there's no point in burning cycles just for fun. Do you think that there would be no significant drawback to running FAST at 10kHz for a motor speed of ~1300Hz? If so, I'll just change the appropriate decimator from 1 to 2.

    CC: The R/L is not a limitation of FAST, it is a limitation of the motor design. First, I'm not sure you have the correct R and L values for your motor. Please re-ID using my suggestions.  My yes, if your R/L is ~1000, you will NEVER be able to run this motor with the expected voltage bus to 1500 Hz.  You can increase the Bus Voltage (possibly damaging your motor) or use Field Weakening, but R/L is a machine design limitation for motors.

    (Disclaimer; I'm relatively new to PMSM motors, so please bear with me). I don't see how R/L, in and of itself, can completely determine the maximum speed of the motor. For example, assume I were to halve the area of the copper conductors in the motor; this would have (nearly) no effect on any parameter other than doubling the series resistance, and thereby halving the R/L cutoff frequency. From a controls perspective obviously this will change the motor behavior (moving the R/L pole to a lower frequency), but I can't see how this will limit the motor speed with some "ideal" commutator/driver. How would the motor be damaged by increasing the bus voltage and increasing the speed? Obviously at some point the motor will (possibly catastrophically) be damaged, but electrically I can't see how this will happen. It's probably worth considering that the "hobby motors" used are probably very far from well designed and thought through, so I doubt that the R/L factor has been chosen to match the motor's maximum speed; if anything I'd guess that both the resistance and inductance are the result of just placing a number of windings around the stator to reduce the series resistance and increasing the magnet thickness to bring the flux to some reasonable value...

    Regarding your last post and the inverse relationship:

    CC: I believe you will see more stable results by updating your Voltage filters (HW & SW setting) to use a cross over frequency of your IQ_Hz / 4.  So if you want to use (2000) design the filter for 500 Hz. This is something that we are still investigating as we try higher speed motors, but this /4 has had consistent results. 

    I'll try this out, thanks!

    But I still think you are hitting the limit of your motor design...

    Yeah, you'll find no argument from me here, at the moment I'm only concerned with the behavior of FAST, where the speed was not accurately tracked...

    //Jonathan

  • Ben,

    "What 's the relationship between Rs/Ld/Lq and the motor stator winding's resistance R and inductance L. Can we measure the stator's resistance and inductance and then calculate out the Rs and Ld / Lq (For PSMS motor)"

    Rs = stator resistance

    stator inductance average = Ls = Ls-d = Ls-q

    Yes, you man measure Rs and Ls by hand (phase to phase) or using the InstaSPIN-FOC Motor ID features (phase to neutral, will be half of phase to phase).

  • Ben,

    Regarding your power measurement, while you can add a return current you should also use be able to use gMotorVars.Is_A, which is defined as (see lab 10a)

    // calculate vector Is in amps
    gMotorVars.Is_A = _IQsqrt(_IQmpy(gMotorVars.Id_A, gMotorVars.Id_A) + _IQmpy(gMotorVars.Iq_A, gMotorVars.Iq_A));

    I think you would need to multiply by Vbus & Vs (which is a per unit scaling of the vector)

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

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

  • "I can easily use lower currents when performing an identification; would it be beneficial to use around 3A, and manually help the rotor get started? My naive assumption is that a higher current will increase the accuracy of the idenfication, as there are more bits used in the current input."

    For the identifying the Flux and Ls, use just enough current to get the motor to start during RampUp and continue through final identification.  If this requires a significant value, I would then do some testing to see how the Rs ID (or RsRecalc) behave with a lower current. Look at the delta you are getting between 1A and the maximum required to RampUp.  In general you want this to stay as low as possible, but if the Rs difference isn't very much you can keep it higher.  Recall that the RsRecalc can be used as an initial alignment feature before start-up (to align the fields for maximum torque generation), but if the current isn't high enough to move the rotor shaft for alignment it won't do you any good.

    "Well, there's no point in burning cycles just for fun. Do you think that there would be no significant drawback to running FAST at 10kHz for a motor speed of ~1300Hz? If so, I'll just change the appropriate decimator from 1 to 2."

    The drawback or limitation will be for very small flux machines as the smallest flux value will be based on 

    USER_IQ_FULL_SCALE_VOLTAGE_V / FAST_EST_Hz / 0.7

    However, for dynamic performance FAST does just fine at 10 KHz and if running the current loop at 20 kHz I'd use 10 for FAST.  If running current loop at 15 kHz I would run FAST at 15, 7.5, or 5 if very low dynamics.

    I don't see how R/L, in and of itself, can completely determine the maximum speed of the motor.

    It can't completely. It's a theoretical maximum. If you used magnets that created a large flux it would be this Bemf that would limit the top seed (without field weakening).  That's why high speed motors typically have very small flux designs that keep the Bemf under the bus voltage, so you can attempt to drive them to their R / L stability limit.  

    As mentioned, most motors actually do work in the 1/2 R/L to R/L range, as they are well designed for their purpose.  Hobby motors we have found to often have ridiculously high R/L values...they create a very high R/L so that they only operate in a lower portion for stability reasons. Stepper motor manufacturers have done something similar except they increase the Rs instead of reducing the Ls.

    By using FAST motor manufacturers could create Hobby motors with an R/L of a reasonable value of their desired maximum frequency - at an even lower cost. These could still have high acceleration but have reduced current ripple, lower PWM, better efficiency, better current measurement, lower motor temps, smaller motors.

    Yeah, you'll find no argument from me here, at the moment I'm only concerned with the behavior of FAST, where the speed was not accurately tracked...

    I'm very sure this has to do with the degradation of the flux signal at the limit of operation, and specifically tied to the phase voltage filter. Recall we made this HW generic and typically run motors <1 KHz.  We should be able to use a range for the filter but it looks like we have found a dependence between the filter cut-off and the IQ_Hz.  We are still investigating, but choosing a FILTER and IQ_V = 4x FILTER will certainly give you the best results.

  • Chris,

       Thanks a lot! I will check the ID result with the direct measurement. One more question, Is the Rs included the phase current shunt resistance? it is to say that Rs = Rmeasured-phase-to-phase / 2 + Rphase-current-shunt. Will the DC bus return shunt resistance effect the Rs value?

  • The Motor ID Rs won't exactly match hand measured phase-phase / 2. Remember that for the Motor ID we are injecting some current. Your multimeter current is non-significant. They will be close though.

    You don't need to worry about the resistance of the current shunt.

  • Ben,

    Let me correct myself regarding the power measurement.

    Here is what we would recommend.

    Power in the Field / On the shaft:

    Torque (N.m) x Speed (rad/sec) = Power (W)

    Alternatively you could try

    0.75 x Vbus (V) x (Vd x Id + Vq x Iq) = Power (W)

     

  • Chris:

        Thanks for your reply,  I can understand the first equation. But I'd appreciate if you can explain what's the meaning of the second equation more detail. 

  • 0.75 = 3/4 = conversion for RMS line-line

    Vd and Vq are in per unit, so they are essentially a % of the Vbus.

    Iq and Id are in Amps

    So you can think of it as Bus RMS x  % of Bus x Current, and you sum this for Q and D.

     

  • Thanks for the pointers Chris. After altering the phase voltage filter to a cutoff frequency of around 450Hz, and (probably more importantly) choosing better filtering capacitors (previously 10V X7R +-20% capacitors, now I'm using 50V X7R +-5% capacitors (the higher voltage specification to reduce the effect of capacitance change vs. DC bias)) everything behaves as expected. It may be worth considering adding a note in the instaspin users guide to select a filtering capacitor with a smaller tolerance than bog-standard decoupling capacitors, though to no small extent do I only have myself to blame for this ;)

  • REALLY glad to hear that the capacitor issue solved your problems.  Thanks so much for letting us know, it will come up again and again I'm sure!