Home

ST AN4144 Application note handbook

image

Contents

1. gt DutyCyclepym 1000 step s 85 0 8 106 25 Doc ID 023491 Rev 1 ky AN4144 Thermal drift compensation guidelines 4 Thermal drift compensation guidelines The compensation of the thermal drift of the phase resistance is not automatically performed by STMicroelectronics devices but a compensation factor KTHERM is made available through a dedicated register The thermal compensation factor KTHERM is a scalar value between 1 no compensation and 1 5 which is applied to the PWM value obtained by the other compensation systems BEMF compensation and supply voltage compensation As shown in Equation 11 of Section 1 4 the thermal drift of the resistance is directly proportional to the nominal resistance value R ro and the temperature variation For this reason the thermal drift compensation becomes more important when the driven motor has a high phase resistance value A suggested implementation of the thermal drift compensation is based upon the phase current measurement during the non operative period of the motor if present The proposed method requires an initial calibration of the system performed when the motor is cold and described by the following sequence 1 The motor is stopped in a specific electrical position 2 The overcurrent or stall detection threshold is set to a calibration value lcal 3 The output voltage is increased at a low rate through the KVAL HOLD parameter 4 When the calib
2. wa AN4144 YI Application note Voltage mode control operation and parameter optimization By Enrico Poli Introduction Voltage mode driving is the stepper motor driving method patented by STMicroelectronics which improves the performance of classic control systems This driving method performs smoother operation and higher micro stepping resolutions and is the best solution for applications where high precision positioning and low mechanical noise are mandatory This application note describes the operating principles of Voltage mode driving and the strategies for the regulation of the control parameters in order to fit the application requirements The application note also investigates and provides solutions to one of the most common issues in Voltage mode driving systems the resonances of the stepper motors July 2012 Doc ID 023491 Rev 1 1 28 www st com Contents AN4144 Contents 1 Voltage mode driving 444 00 ce cece eee eee eee eee 5 1 1 Basic principles AA deat hk arene Shere epee Nace 5 1 2 Back EMF compensation algorithm 00 eee eee ee 7 1 3 Motor supply voltage compensation 0000000 ee eee 11 1 4 Compensation of thermal drift of the phase resistance 12 2 Tuning of the BEMF compensation parameters 13 2 1 Collecting the application characteristics 13 2 2 First dimensioning Ham a nakaasa BBADDE BBS AD NID GARA ASA A
3. 9 of the material composing the coil Equation 11 Rin T Rm tot AR T Rm tot Rm to O T To As described in previous paragraphs the voltage to current relation depends on different motor parameters including phase resistance Rm in Equation 1 In particular a higher phase resistance reduces the load current at the same applied voltage The duty cycle of the PWM output is multiplied by a scalar factor in order to compensate for the resistance variation Doc ID 023491 Rev 1 ky AN4144 Tuning of the BEMF compensation parameters 2 2 1 Tuning of the BEMF compensation parameters This paragraph describes how the BEMF compensation parameters can be tuned in order to obtain the best results Setting the correct compensation parameters is fundamental to Voltage mode algorithm performance The tuning sequence can be divided into the following steps e Collecting the characteristics of the application and motor Section 2 1 e Obtaining a preliminary set of parameters Section 2 2 e Tuning the parameters in order to obtain the needed results Section 2 3 Collecting the application characteristics The compensation system is based on the electrical model of the stepper motor so its setup is strongly dependent on the motor characteristics The required information is e Resistance of the motor phase Rm Inductance of the motor phase Lm e Electrical constant of the motor k The Rm and L val
4. FN_SLP_ACC Deceleration KVAL_DEC INT_SPEED ST_SLP FN_SLP_DEC Constant speed KVAL_RUN INT_SPEED ST_SLP 3 FN SLP ACC The holding current generates the magnetic field that keeps the motor in position after the motion is completed Its value is usually lower than the others because it is not necessary to face the friction and the inertial component of the load torque In these conditions the BEMF value is zero so no compensation is needed and the only parameter defining the current is KVAL HOLD During the acceleration phase the current is set through the KVAL ACC INT SPEED ST SLP and FN SLP ACC parameters The constant speed current setup shares most of the parameters with the acceleration setup INT SPEED ST SLP and FN SLP ACC so the two currents are closely related The BEMF compensation curve for the acceleration phase INT SPEED ST SLP and FN SLP ACC parameters defines the minimum output voltage at each speed limiting the minimum constant speed current Figure 9 Figure 9 Running current limit VoutVeus Minimum output LA eo ete oka ee ee ee cece eesti ed i ig ping The pung curve cannot be performed Compensation curve for l una Compensation curve for RUN B Speed step s AM12865v1 Doc ID 023491 Rev 1 ky AN4144 Tuning of the BEMF compensation parameters 2 2 2 2 3 Compensation register values out of range In some cases the values obtained using the
5. a rotation speed of only 250 step s So a high compensation value does not correspond to any real application The application parameters supply voltage target current and motor characteristics are not consistent and they should be changed Fine tuning In some cases the results obtained after the first dimensioning of the BEMF parameters Section 2 2 do not fit with the performance required by the application In these cases the optimal compensation can be obtained by fine tuning the system Performing these adjustments requires a current probe that is able to measure the phase currents over the entire operating range of the application The following procedure describes how to tune the acceleration parameters of the BEMF compensation system KVAL_ACC INT_SPEED ST_SLP and FN_SLP_ACC Replacing the KVAL_ACC and FN_SLP_ACC values with the respective deceleration parameters KVAL_DEC and FN_SLP_DEC the same procedure can be used to tune the BEMF compensation in the deceleration phase Intersect speed and starting slope parameters are shared by both the acceleration and deceleration compensation setups Section 2 2 1 so their tuning should be performed one time only Doc ID 023491 Rev 1 17 28 Tuning of the BEMF compensation parameters AN4144 2 3 1 2 3 2 18 28 Step 1 verify the phase current during the speed sweep The most important step in the fine tuning of the BEMF compensation system is the analysis of the res
6. critical issue in the development of a stepper motor application This section lists the most common solutions to reduce or avoid resonance effects Damping resonances using the mechanical load The worst condition for stepper motor driving is when the shaft is unloaded When the shaft remains unloaded all the energy provided to the motor is dissipated by the rotor itself exciting its resonance points Doc ID 023491 Rev 1 25 28 Stepper motor resonances AN4144 5 2 2 5 2 3 26 28 Even a small load can dampen the rotor oscillations enough to make the motion smoother Moreover the mechanical load adds inertia to the system shifting the resonance points The stepper motor mounting can also influence the resonance frequencies Reducing motor current As previously described the resonances are caused by the rotor oscillations during a step change The amplitude of these oscillations is proportional to the intensity of the stimulating magnetic field i e the current value Reducing the phase current to the minimum required reduces the strength of the resonances Many times the resonance points of the stepper motor are represented as a lack of torque on the speed torque curve This representation may cause misunderstandings with this issue The reduced torque is not the root cause of the problem resonance but it is the consequence of it Therefore increasing the phase current in order to compensate for the torque reduction
7. the oscilloscope to magnify the critical areas Figure 15 Split the acceleration into more parts Figure 15 Magnified acquisition verifies the presence of artifacts ttf tt fitted HHHH tHe jise See Ser en See eee eee P that pai m AM12871v1 Doc ID 023491 Rev 1 21 28 Supply voltage compensation guidelines AN4144 3 22 28 Supply voltage compensation guidelines The effectiveness of the compensation is strongly dependent on the actual duty cycle value because the system is not able to overcome the maximum duty cycle of 100 When the variations of the application supply voltage make the use of the compensation system essential the maximum target current is limited by the lower voltage value which is expected from the power supply output For this reason the application setup i e motor characteristics and phase currents should be chosen considering the minimum expected supply voltage For example suppose 85 of the 24 V bus is needed in order to reach the target current at 1000 step s If the bus voltage is reduced by 20 i e the actual voltage is 24V 0 8 19 2 V the compensation system increases the duty cycle by a factor of 1 0 8 1 25 In this case the resulting duty cycle is 106 25 which is greater than the maximum available value 100 Example 3 Veus VBUS nom 24 V gt DutyCyclepym 1000 step s 85 Vsus 0 8 Veusnom 19 2 V
8. whatsoever any liability of ST ST and the ST logo are trademarks or registered trademarks of ST in various countries Information in this document supersedes and replaces all information previously supplied The ST logo is a registered trademark of STMicroelectronics All other names are the property of their respective owners 2012 STMicroelectronics All rights reserved STMicroelectronics group of companies Australia Belgium Brazil Canada China Czech Republic Finland France Germany Hong Kong India Israel Italy Japan Malaysia Malta Morocco Philippines Singapore Spain Sweden Switzerland United Kingdom United States of America www st com 28 28 Doc ID 023491 Rev 1 1577
9. with a sinusoidal current Due to its principle of operation Voltage mode driving is not suited to full step driving The best performance is always obtained using microstepping operation This result can be obtained through the analysis of the stepper motor electrical model Equation 1 extracted from the model in Figure 1 shows how the current of a generic motor phase is related to Phase voltage Vpy e Back electromotive force BEMF e Phase resistance Rm and inductance Lm The back electromotive force is typically a sinusoidal voltage with frequency and amplitude proportional to motor rotation speed The BEMF frequency f 1 is equal to one quarter of the rotation speed expressed in steps per second fsrep this frequency is exactly the same as the hypothetical current sinewave that should be applied to the motor phase in order to make the motor turn at fgtep step rate The BEMF amplitude is proportional to step frequency through a linear coefficient k this parameter depends on motor characteristics and structure rotor material coil turns etc Doc ID 023491 Rev 1 5 28 Voltage mode driving AN4144 6 28 Figure 1 Motor phase electrical model Stepper motor V t Motor phase AM12849v1 Equation 1 Vpy t BEMF f ipH t Ona L mt i2nty Lm Considering all the currents and voltages of the electrical model as sinusoidal Equation 1 can be written as a vector equation Equatio
10. 5 Supply voltage compensation system c eee eee eee 11 Figure 6 Phase inductance measurement 0 tae 14 Figure 7 Bad k measurement waveform sarn n nnn nn rannan 15 Figure 8 Good k measurement waveform sssusa ee 15 Figure 9 Running current Mit serri 24G 3 eo rete bea daimia ted mn aN rroa ewe ae 16 Figure 10 Speed sweep with first dimensioning parameters eee eee eee 18 Figure 11 Evaluation of the optimal intersect speed value 1 2 00 0 ee 19 Figure 12 Tuned starting slope value 2 0 eee ae 20 Figure 13 Tuned final slope value 1 0 eee ae 20 Figure 14 Final check acquisition showing artifacts 0 2 0 eee ee 21 Figure 15 Magnified acquisition verifies the presence of artifacts 21 Figure 16 Position ripple caused by the step change 0 eee eee 24 Figure 17 Phase current distortion 00 0 cette 25 Figure 18 Motor stall caused by resonances 0 00 cee tae 25 ky Doc ID 023491 Rev 1 3 28 List of tables AN4144 List of tables Table 1 BEMF compensation parameters cette eee 8 Table 2 BEMF compensation parameters normalized to the supply voltage Vpys 10 Table 3 BEMF compensation register values according to application parameters 15 Table 4 Motor status and BEMF compensation registers relationship 16 Table 5 Output current acc
11. PANA BA 15 2 2 1 Holding acceleration deceleration and running currents 16 2 2 2 Compensation register values out of range 17 2 3 alala 17 2 3 1 Step 1 verify the phase current during the speed sweep 18 2 3 2 Step 2 adjust the starting amplitude KVAL 18 2 3 3 Step 3 adjust the intersect speed value 19 2 3 4 Step 4 adjust the starting and final slopes 19 2 3 5 Step 5 final check aana 20 3 Supply voltage compensation guidelines aaa 22 4 Thermal drift compensation guidelines 000e eee eens 23 5 Stepper motor resonances 02 e eee 24 5 1 The effects of the resonances on Voltage mode driving 24 5 2 Facing resonances 210 45 dere ete KARA ABAKA KNA KeeeES Sei KANA 25 5 2 1 Damping resonances using the mechanical load 25 5 2 2 Reducing motor current ce eee tee 26 5 2 3 Skipping the resonance points increasing the acceleration 26 6 REVISION history 2s ae eins ee ae aw 27 2 28 Doc ID 023491 Rev 1 1577 AN4144 List of figures List of figures Figure 1 Motor phase electrical model 1 2 0 0 0 eee 6 Figure 2 Phasor representation of motor phase equation 0 cee ee 6 Figure 3 BEMF compensation curve 0 000 eee teens 9 Figure 4 Maximum output current limitation example a 10 Figure
12. at relates the motor speed to the BEMF amplitude This value is not usually present on stepper motor datasheets but it can be easily measured by means of an oscilloscope Connect one of the motor phases to an oscilloscope channel Set the oscilloscope to the trigger value on the rising or falling edge of the channel and set the threshold value close to zero few mV above or below zero Turn the motor shaft This can be done by hand or by means of another motor The most important thing is to obtain a rotation speed as constant as possible Set oscilloscope time and voltage scales in order to display a sinewave during the motor rotation If the rotor is turned by hand the operations should be repeated until a good sinewave is obtained A good sinewave keeps its amplitude constant for at least 2 or 3 cycles Figure 7 and Figure 8 This operation might require several attempts Measure the peak voltage to frequency ratio of the sinewave The resulting value is the motor electric constant expressed in V Hz Doc ID 023491 Rev 1 ky AN4144 Tuning of the BEMF compensation parameters Figure 7 Bad k measurement waveform Figure 8 Good k measurement waveform Tek Stopped 5 Acas 24 Aug 10 14 08 18 Hi Pres Shee 24 Aug 10 14 09 37 N N N m ika LO AA LA GOOD AM12B63y1 AM12864v1 2 2 First dimensioning A preliminary set of parameters can be obtained starting from the simplified model of the stepper
13. e 5 Output current according to the electrical position Electrical position Output current OUTB1 source OUTB2 sink OUTA1 and OUTA2 shorted to ground OUTA1 source OUTA2 sink OUTB1 and OUTB2 shorted to ground OUTB2 source OUTB1 sink OUTA1 and OUTA2 shorted to ground OUTA2 source OUTA1 sink OUTB1 and OUTB2 shorted to ground 0x000 0x080 0x100 0x180 2 3 3 Step 3 adjust the intersect speed value The most important parameter in the BEMF compensation algorithm is the intersect speed Its optimal value can be determined by performing a speed sweep i e a slow acceleration as described in Section 2 3 1 setting the final slope value equal to the starting slope value which has been obtained during the first dimensioning The resulting phase current is almost constant in the first part of the motion and it decreases at higher speed a motor stall may occur before the maximum speed is reached The intersect speed value is the motor speed at which the phase current begins decreasing e g in Figure 11 the optimal intersect speed value is about 138 9 step s Figure 11 Evaluation of the optimal intersect speed value AM12867V1 2 3 4 Step 4 adjust the starting and final slopes After setting the new value for the intersect speed the starting and final slopes must be adjusted It is recommended to change one of the two values at a time changing both the starting and final slopes simultaneousl
14. formulas listed in Table 3 may be out of the range of the respective registers If one of the Kya registers exceeds the maximum limit of 255 corresponding to a PWM duty cycle close to 100 the motor supply voltage is not large enough to force the target current into the phase resistance In this case the application parameters supply voltage target current and motor characteristics are not consistent and they should be changed Example 1 Veus 12 V Rm 9 amp IpH TARGET 2 A KyaL Rm IIPH_ TARGET VBus i 28 384 gt max KVAL value 255 Target current is not achievable If the intersect speed exceeds the maximum value the resistive component of the motor phase impedance dominates the inductive component so the increase of the impedance with speed can be considered negligible and its compensation is unnecessary In this case the maximum intersect speed value may be used and during the fine tuning phase particular attention should be paid to the intersect speed region Example 2 Lm 4 mH Rm 10 Q 4 Rm Lm 10000 steps s gt maximum value should be used If one or more of the compensation slope parameters ST_SLP FN_SLP_ACC and FN_SLP_DEC exceeds the maximum value the motor supply voltage is not enough to counteract the BEMF voltage increase The maximum compensation rate is 0 04 of the bus voltage at step s Considering a starting Kya value equal to zero this compensation rate reaches 100 of the bus voltage at
15. inued Parameter Description Formula Unit Compensation slope Fa EAs Starting used when motor Hz Lcycle slope speed is lower than K 4 V s step intersect speed Compensation slope Ea Rode Final slope used when motor Hz Lcycle P speed is higher than 2m Lm lpu taRGET K 4 V s step intersect speed The control system generates the phase voltage using a PWM modulation The outputs switch between supply voltage Vays and ground at a fixed frequency The mean voltage of the resulting square wave is adjusted through its duty cycle on time over square wave period ratio according to the following formula Equation 8 t VpH Veus SA Vgus DutyCyclepyy The duty cycle ranges from 0 the output is always forced to ground to 100 the output is always forced to Vpys The BEMF compensation curve is implemented adjusting the PWM duty cycle so all the voltage values must be normalized to the supply voltage of the power stage Figure 3 Figure 3 BEMF compensation curve Vou Vsus Kal m a Intersect Speed speed step s AM12859v1 Doc ID 023491 Rev 1 9 28 Voltage mode driving AN4144 Table 2 BEMF compensation parameters normalized to the supply voltage Vpys Parameter Kyai Formula Rm h PH TARGET V Bus Unit Q AV V bn Q H cycle step H Intersec
16. is usually not a solution Skipping the resonance points increasing the acceleration The most common method to avoid resonance points is to quickly accelerate past their positions Working within the range of the system resonances is never recommended even for a short period of time High acceleration values allow the motor to pass through the resonance points faster reducing the negative effects Doc ID 023491 Rev 1 ky AN4144 Revision history 6 Revision history Table 6 Document revision history Date Revision Changes 26 Jul 2012 1 Initial release Doc ID 023491 Rev 1 27 28 AN4144 Please Read Carefully Information in this document is provided solely in connection with ST products STMicroelectronics NV and its subsidiaries ST reserve the right to make changes corrections modifications or improvements to this document and the products and services described herein at any time without notice All ST products are sold pursuant to ST s terms and conditions of sale Purchasers are solely responsible for the choice selection and use of the ST products and services described herein and ST assumes no liability whatsoever relating to the choice selection or use of the ST products and services described herein No license express or implied by estoppel or otherwise to any intellectual property rights is granted under this document If any part of this document refers to any
17. motor described in Section 1 1 Starting from the formulas listed in Table 2 of Section 1 2 it is possible to define the BEMF compensation register values as shown in the following table Table 3 BEMF compensation register values according to application parameters Parameter Register name Register value KVAL_HOLD Kya KVAL ACC R II IN 28 KVAL DEC KVAL RUN m PH Tarcet VBus Intersect speed INT SPEED An Fife cos tick where tick 250 ns Starting slope ST_SLP K 4 Vpus p16 FN SLP ACC Final slope FN SLP DEC 21 Lm lpH tarcet Ko 4 Vpus 2 16 The resulting values are not the optimal compensation values because they are obtained starting from a simplified model of the motor They can be used as a starting point for further optimization of the control system The same result can be easily obtained using the BEMF compensation tool which is integrated into the L6470 evaluation software Doc ID 023491 Rev 1 15 28 Tuning of the BEMF compensation parameters AN4144 2 2 1 16 28 Holding acceleration deceleration and running currents The BEMF compensation system allows different current values according to motion status The different current values are set through a specific set of registers as shown in Table 4 Table 4 Motor status and BEMF compensation registers relationship Motor status Registers Hold motor stopped KVAL_HOLD Acceleration KVAL_ACC INT_SPEED ST_SLP
18. n 2 The resulting vector system which is shown in Figure 2 adds a new variable to the current vs voltage relationship the load angle B which is the angle between stator and rotor magnetic field vectors The load angle is in direct relation with the angle a lying between the phase current and BEMF phasors as shown in Equation 3 The torque Tq applied to the motor shaft is proportional to both the phase current and the sine of the load angle as shown by Equation 4 where the k parameter is the motor torque constant which is equal to the k constant but expressed in Nm A instead of V Hz Figure 2 Phasor representation of motor phase equation a 6 arctan 2nf L_ R_ elm mi AM12850v1 Doc ID 023491 Rev 1 ky AN4144 Voltage mode driving Equation 2 VpH fei BEMF f alle oar a Rm i2nty Lm Equation 3 EER a G B Equation 4 Tg Ky Ip COS 0 5 Ki Ipy cos B K Nm A K V Hz Starting from Equation 2 it is possible to obtain the voltage amplitude which when applied to the motor phase makes the amplitude of phase current constant The basic principle of Voltage mode control is based on this relationship The resulting formula Equation 5 shows how the voltage amplitude is a complex function of phase current motor parameters and other factors Equation 5 VoH Rin 2nf Da i la T ke Mi 2cos n o arctan 2nf Lin Rm len Ke fei Rec 2m gt Len Resol
19. n the step rate matches the oscillation frequency the mechanical resonance is stimulated which results in a jittering motion In some cases the vibration can be strong enough to cause a step loss or motor stall Figure 16 Position ripple caused by the step change t position AM12872v1 The position and the strength of these resonance points depends on the relationship between motor characteristics in particular the inertia and the stiffness of the rotor and mechanical load connected to the shaft The effects of the resonances on Voltage mode driving The vibrations caused by the motor resonances distort the back electromotive force making the model described in Section 1 1 no longer valid In fact if the back EMF is not sinusoidal applying a sinusoidal voltage to the motor phase results in a distorted current Figure 17 The distortion of the phase current may amplify the resonances and cause a motor stall Figure 18 Doc ID 023491 Rev 1 ky AN4144 Stepper motor resonances 5 2 1 Figure 17 Phase current distortion rv M20ms 25 0MSi a Chs S00mA Q A Chs 7 120mA AM12873v1 UN Cae Gee x 7 140mA Stall condition no BEMF gt no current distortion Resonance condition current distorted i a MG i _ HH a m a a E So gt ee ae Zoom 1 Ch4 Z Ch4 500mA 2 0ms AM12874v1 Facing resonances Facing resonances is a
20. ording to the electrical position 0 00 e eee eee eee 19 Table 6 Document revision history 0 0 0 ee te tee 27 4 28 Doc ID 023491 Rev 1 ky AN4144 Voltage mode driving 1 1 Note Voltage mode driving This section describes the basic principles of Voltage mode driving and its implementation in STMicroelectronics devices with a focus on the compensation of The back electromotive force Section 1 2 e The motor supply voltage variation Section 1 3 e The thermal drift of the phase resistance Section 1 4 Basic principles The classic current mode driving method limits the phase current to a reference value using a comparator and a current sensor usually an external resistor This control is the most intuitive but brings with it some drawbacks the current ripple can be significant and obtaining an acceptable control of the current can be challenging In trying to solve these problems current control algorithms were made more and more complex including techniques such as fast decay and mixed decay With the introduction of microstepping in stepper motor driving a new current control algorithm limit became evident the analog circuitry and the control loop should be able to manage lower currents with higher resolution Voltage mode totally changes the control approach implementing an open loop control a sinusoidal voltage is applied to the motor phases and the electro mechanical system response
21. ration current is reached the respective KVAL_HOLD value must be stored KCAL in the MCU memory Since the KCAL value is related to the design parameters only this calibration can also be performed during the design of the application However because of the variation of the application characteristics bus voltage motor phase resistance etc and the device circuitry current sensing it would be useful to perform the calibration sequence on each system instead of defining a single KCAL value during the application design When a significant change of the motor temperature is expected the following compensation sequence can be performed 1 The motor is stopped in the same electrical position used during the calibration 2 The overcurrent or stall detection threshold is set to a calibration value lcal 3 The KVAL_HOLD value is set to KCAL 4 The compensation coefficient K_THERM is increased or decreased in order to reach the calibration current using the overcurrent stall information provided by the device Doc ID 023491 Rev 1 23 28 Stepper motor resonances AN4144 5 5 1 24 28 Stepper motor resonances The stepper motors as in all complex mechanical systems have one or more resonance points These resonances are strictly related to the motion performed by the stepper motors at each step or microstep the rotor approaches the new position and it oscillates around this position before stopping Figure 16 Whe
22. roximated when these two cases are considered Equation 7 Wami Rm IpH_tarcet Ke foi for 2nfo c Rm Lm The Voltage mode control implemented in STMicroelectronics products is based on the simplified model described by Equation 7 In particular the following parameters are extracted and used to describe the compensation curve Kais the voltage applied to the motor phase at zero speed It is the starting point of the BEMF compensation curve e Intersect speed is the motor speed that determines the switching from the low speed compensation factor starting slope to the high speed one final slope e Starting slope is the rate at which the phase voltage is increased in the low speed range i e motor speed is less than intersect speed e Final slope is the rate at which the phase voltage is increased in the high speed range i e motor speed is greater than intersect speed These parameters are listed in Table 1 Table 1 BEMF compensation parameters Parameter Description Formula Unit Voltage applied to the K phase at zero speed in val order to obtain the Rm lpH_TaRGET 9 A V target current value ste ere gt 9H Motor speed cycle Intersect discriminating the see Hz speed compensation slope 4 R 2aL cycle that should be used step s 8 28 Doc ID 023491 Rev 1 ky AN4144 Voltage mode driving Table 1 BEMF compensation parameters cont
23. t speed Az p 4 R 2nL cycle step s Starting slope A163 aap Final slope Alab mel p 21 Ly lpy tarcet Ke 4 V pus eya The supply voltage of the systems limits the maximum phase current which is a function of the motor speed If the phase voltage which is needed to obtain the target current is greater than the supply voltage the phase current cannot reach the expected value Figure 4 Figure 4 Maximum output current limitation example Maximum current value according to bus voltage ny Motor characteristics Rm 5Q Ln 3 MH 12 ke 0 03V Hz 5 08 ara Speed step s AM12860v1 10 28 Doc ID 023491 Rev 1 AN4144 Voltage mode driving 1 3 Motor supply voltage compensation The power stage generates the voltage sinewaves using a PWM modulation method so the average output voltage value is proportional to the motor supply voltage Vays and power bridge duty cycle see Equation 9 Therefore perturbations on this voltage cause errors on the output voltage and then on the phase currents Equation 9 Vex Vpus DutyCyclepyy In most industrial applications the supply voltage is not well regulated and it may undergo significant voltage fluctuations due to various factors e g variations of load conditions The Voltage mode algorithm implemented in STMicroelectronics devices provides a compensation system that increases the supply voltage rejection of PWM modulator The supply voltage is constan
24. third party products or services it shall not be deemed a license grant by ST for the use of such third party products or services or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such third party products or services or any intellectual property contained therein UNLESS OTHERWISE SET FORTH IN ST S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE USE AND OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED WARRANTIES OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE AND THEIR EQUIVALENTS UNDER THE LAWS OF ANY JURISDICTION OR INFRINGEMENT OF ANY PATENT COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT UNLESS EXPRESSLY APPROVED IN WRITING BY TWO AUTHORIZED ST REPRESENTATIVES ST PRODUCTS ARE NOT RECOMMENDED AUTHORIZED OR WARRANTED FOR USE IN MILITARY AIR CRAFT SPACE LIFE SAVING OR LIFE SUSTAINING APPLICATIONS NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY DEATH OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE ST PRODUCTS WHICH ARE NOT SPECIFIED AS AUTOMOTIVE GRADE MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER S OWN RISK Resale of ST products with provisions different from the statements and or technical features set forth in this document shall immediately void any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner
25. tly monitored through a voltage divider and an integrated analog to digital converter and the power stage duty cycle is changed in order to compensate for its variations Figure 5 Supply voltage compensation system DEVICE AM12861v1 The voltage divider should be sized in order to obtain Vpgg 2 at the ADC input when the supply voltage is at its nominal value When the supply voltage is perturbed the same distortion is proportionally applied to the ADC input and the nominal duty cycle is multiplied by a compensation coefficient k as shown in Equation 10 Equation 10 Vpy Vpus E DutyCyclepyy K Veus DutyCyclepyw where k 1 e Doc ID 023491 Rev 1 11 28 Voltage mode driving AN4144 1 4 12 28 In any case the compensation system is limited by the actual supply voltage if the compensated duty cycle DutyCyclepwm Ke is greater than 100 the supply voltage is not large enough to obtain the target current maximum output current limit has been reached and the compensation algorithm fails Compensation of thermal drift of the phase resistance During operation the motor dissipates energy and increases its temperature therefore the phase resistance The relationship between phase resistance and temperature is shown in Equation 11 the change in the phase resistance is proportional to the temperature variation its nominal value phase resistance at room temperature To and the temperature coefficient
26. ues are usually reported on the motor datasheet They can also be measured with common measuring instruments If the user has an RLC meter they can connect it to one of the motor phases and measure the series R and L at 100 Hz make sure the motor does not move The resulting values are considered to be Rm and Lm If they do not have an RLC meter the R can be measured using a bench multimeter applied to one of the phases To measure the Lm use the following procedure Connect a DC voltage at one motor phase and apply the voltage and current probes of the oscilloscope as shown in the Figure 6A Increase the voltage up to the value where the current equals the nominal value e Fora better measurement lock the rotor position e Unplug one terminal of the voltage source cable without switching it off and disable or set to the max the current limitation e Connect the voltage source rapidly and monitor on the scope the voltage and current waveform The measurement is good if the voltage trace is similar to a step and the current increases exponentially Figure 6 B e Measure the time for the current waveform to rise up to 63 of the nominal value Figure 6 B e This time is equal to the Lm Rm ratio Doc ID 023491 Rev 1 13 28 Tuning of the BEMF compensation parameters AN4144 14 28 Figure 6 Phase inductance measurement Phase A Phase B AM12862v1 The k is the coefficient th
27. ult obtained through the first dimensioning procedure This check can be performed monitoring the phase current of the motor during a slow acceleration e g 200 400 step s2 up to the maximum speed of the application If the amplitude of the phase current is constant during the entire acceleration the BEMF is well compensated Otherwise the BEMF compensation parameters should be tuned Figure 10 shows an example of sub optimal BEMF compensation obtained using the first dimensioning formulas target peak current equal to 1 A Figure 10 Speed sweep with first dimensioning parameters M 400rns SOOkS s 2 Opsit A Ch3 7 140mA AM12866v1 Step 2 adjust the starting amplitude KVAL The first value which must be adjusted is the starting amplitude KVAL The value is tuned using the following method 1 Copy the first dimensioning value of the parameter into the KVAL_HOLD register 2 Set the electrical position register EL POS to one of the full step position values Ox000 0x080 0x100 or 0x180 3 Turn on the device outputs sending a HardStop command to the IC only one phase of the motor is driven according to the electrical position value as listed in Table 5 the other outputs are forced to ground through the low side MOSFETs 4 Measure the driving current and adjust the KVAL value in order to obtain the required peak current Doc ID 023491 Rev 1 ky AN4144 Tuning of the BEMF compensation parameters Tabl
28. ving this equation to obtain the phase voltage to be applied for various speeds is very complex and computationally onerous In addition the phase relationship between the current and the BEMF phasors q is difficult to measure or evaluate for a specific application The STMicroelectronics control method starting from this complex model implements an effective driving strategy that overcomes these issues with the classic current mode control method in most microstepping applications 1 2 Back EMF compensation algorithm In order to devise a simple but effective compensation method consider the formulas in Equation 6 In this manner the dependence on the load angle B can be removed obtaining a formula which allows the evaluation of the Vpy voltage that is able to produce a constant lpp Current independent of the motor speed or its equivalent f Equation 6 Vou S Rmti2nfo Lin lp Vsem fe Vex JRm 2mo Lm lpH Ke fo Doc ID 023491 Rev 1 7 28 Voltage mode driving AN4144 Using this formula a compensation algorithm that gives the phase voltage amplitude Vpy for a target phase current Ipp and motor speed f is defined The compensation algorithm of Equation 6 can be further simplified according to the electrical frequency Two different cases can be considered when the motor speed is low 2rf lt lt R L and when it is high 270f gt gt R L Equation 7 shows how the formula can be app
29. y may make it more difficult to find the optimal combination As for the intersect speed the correct values can be obtained by measuring the phase current during a series of speed sweeps 1577 Doc ID 023491 Rev 1 19 28 Tuning of the BEMF compensation parameters AN4144 2 3 5 20 28 To tune the starting slope value the initial part of the acceleration from zero to the intersect speed must be considered Figure 12 If the current amplitude increases the starting slope value must be reduced otherwise it must be increased The same operation must be done for the evaluation of the final slope value but the final part of the acceleration must be considered Figure 13 Figure 12 Tuned starting slope value AM12868v1 AM12869v1 Step 5 final check When all the values have been tuned and the optimal compensation is obtained a final check should be done Performing a speed sweep the measured current amplitude must be almost constant According to the oscilloscope characteristics some artifacts Figure 14 may be displayed when long time acquisitions are performed Doc ID 023491 Rev 1 ky AN4144 Tuning of the BEMF compensation parameters Figure 14 Final check acquisition showing artifacts 549475957 AM12870v1 In order to avoid mistaking artifacts for real compensation errors the following suggestions should be considered If present use the ZOOM function of

Download Pdf Manuals

image

Related Search

ST AN4144 Application note handbook st application note an2867

Related Contents

              Panasonic SDR-H288GK SD card Hard disk camcorder Manual  VAISALA HMP155 Manuel    

Copyright © All rights reserved.
DMCA: DMCA_mwitty#outlook.com.