2023年全國(guó)碩士研究生考試考研英語(yǔ)一試題真題(含答案詳解+作文范文)_第1頁(yè)
已閱讀1頁(yè),還剩34頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、<p><b>  XXXX大學(xué)</b></p><p><b> ?。ㄍ馕姆g材料)</b></p><p><b>  學(xué)院:</b></p><p><b>  專業(yè):</b></p><p><b>  學(xué)生姓名:</b&

2、gt;</p><p><b>  指導(dǎo)教師:</b></p><p>  BLDC Motor Speed Estimation Using PDC Timer Module</p><p>  1 Speed Calculation of BLDC </p><p>  1.1 Summary of BLDC<

3、/p><p>  Since current BLDC has substituted the electrical commutator for the mechanical one, it eliminates the disadvantages of noise, spark, electromagnetic disturbance, short lifetime, etc. Now BLDC is provi

4、ded with advantages of simple structure, dependable operation and easy maintenance as AC motor does, as well as advantages of high efficient, no excitation cost and functional speed regulation as traditional DC motor doe

5、s. So it is widely used in various fields of industrial control now.</p><p>  1.2 PDC Module Introduction </p><p>  SPMC75F2413A provides two channels of 16 bit PDC (Phase Detection Control, PDC

6、) timers used for capture function and PWM operation. It also supports position detection features for Brushless-DC motor application. The PDC timers are very suitable for both mechanical speed calculation, with ACI and

7、BLDC motor included, and phase commutation for changing current conduction according to position information. Figure 1-1 shows the block diagram of entire PDC timers, channel 0 and channel 1. For detail</p><p&

8、gt;  Table 1-1 PDC Timer</p><p>  Figure 1-1 PDC Timers Block Diagram </p><p>  1.3 PDC Operation </p><p>  This note mainly depicts PDC application in motor speed measurement. For

9、detailed PDC introduction, please refer to “SPMC75F2413A Programming Guide” authored by Sunplus. </p><p>  PDC module has four types of registers to perform speed measurement: Timer control register P_TMRx_C

10、trl (x = 0, 1), position detection control register P_POSx_DectCtrl (x = 0, 1), input output control register P_TMRx_IOCtrl (x = 0, 1), and timer interrupt enable register P_TMRx_INT (x = 0, 1). Where, P_TMRx_Ctrl and P_

11、POSx_DectCtrl are introduced in detail. </p><p>  1.31Input Output Control Register </p><p>  P_TMRx_Ctrl(x = 0, 1)</p><p>  Bit 15:14 </p><p>  SPCK: Capture input sam

12、ple clock select. These bits select the capture input sample clock. Capture input will be sampled with sample clock. Pulses shorter than four sample clocks will be considered invalid, and will be ignored.</p><

13、p>  00 = FCK/1 </p><p>  01 = FCK/2</p><p>  10 = FCK/4 </p><p>  11 = FCK/8</p><p>  Bit 13:10 </p><p>  MODE: Modes select. These bits are used to sel

14、ect the timer operation modes. </p><p>  0000 = Normal operation (continuous counter up counting) </p><p>  0100 = Phase counting mode 1 </p><p>  0101 = Phase counting mode 2 </

15、p><p>  0110 = Phase counting mode 3 </p><p>  0111 = Phase counting mode 4 </p><p>  1x0x = Edge-aligned PWM mode (continuous counter up counting, PWM output) </p><p>  1

16、x1x = Center-aligned PWM mode (continuous counter up/down counting, PWM output)</p><p><b>  Bit 9:8 </b></p><p>  CLEGS: Counter clear edge select. These bits select the counter clea

17、ring edge when the clearing source is in input capture mode.</p><p>  00 = do not clear </p><p>  01 = rising edge </p><p>  10 = falling edge </p><p>  11 = both edge&

18、lt;/p><p><b>  Bit 7:5 </b></p><p>  CCLS: Counter clear source select. These bits select the TCNT counter clearing source. </p><p>  000 = TCNT clearing disabled </p>

19、;<p>  001 = TCNT cleared by P_TMRx_TGRA (x = 0, 1) capture input </p><p>  010 = TCNT cleared by P_TMRx_TGRB (x = 0, 1) capture input </p><p>  011 = TCNT cleared by P_TMRx_TGRC (x = 0,

20、1) capture input </p><p>  100 = TCNT cleared by every P_POSx_DectData (x = 0, 1) change 6 times</p><p>  101 = TCNT cleared by every P_POSx_DectData (x = 0, 1) change 3 times </p><p&

21、gt;  110 = TCNT cleared by P_POSx_DectData (x = 0, 1) position detection data change </p><p>  111 = TCNT cleared by P_TMRx_TPR (x = 0, 1) compare match</p><p><b>  Bit 4:3 </b><

22、/p><p>  CKEGS: Clock edge select, These bits select the input clock edge. When the input clock is counted using both edges, the input clock period is halved. When FCK/1 is selected as counter clock, counter wi

23、ll count at rising edge if count at both edges is selected.</p><p>  00 = Count at rising edge </p><p>  01 = Count at falling edge </p><p>  1X = Count at both edges</p><

24、;p>  Bit 2:0 </p><p>  TMRPS: Timer pre-scalar select. These bits select the TCNT counter clock source. It can be selected independently for each channel.</p><p>  000 = Counts on FCK /1 &

25、lt;/p><p>  001 = Counts on FCK /4 </p><p>  010 = Counts on FCK /16 </p><p>  011 = Counts on FCK /64 </p><p>  100 = Counts on FCK /256 </p><p>  101 = Coun

26、ts on FCK /1024 </p><p>  110 = Counts on TCLKA pin input </p><p>  111 = Counts on TCLKB pin input</p><p>  Control register configuration </p><p>  P_TMRx_Ctrl(x = 0,

27、 1) is used for the selection of input capture during speed measurement. Rather than being a general input signal, the input capture is a period between two position detection changes triggered by PDC interrupt. This per

28、iod must be counted with a certain frequency supported by a clock source. Thus, the counters on this function must be configured. </p><p>  MODE: Select a timer operation mode in seven modes. However, only t

29、he normal operation (continuous counter up counting) mode can be selected in this application, because the other six modes are all related to phase counting mode or PWM mode. </p><p>  CCLS: Select a TCNT co

30、unter clearing source from eight settings. In this application, one among the three can be set: 100, 101 or 110, which respectively indicates that TCNT is cleared for once every 6/3/1 times P_the POSx_DectData (x = 0, 1)

31、 changes. Also, they can be described as: TCNT is cleared for once every 360/180/60 electrical degree rotation of BLDC. This setting is critical for converting electrical revolution to mechanical revolution and measuring

32、 the BLDC speed.</p><p>  CKEGS: Select the input clock edge, which can be rising, falling or both edges. When the input clock is counted using both edges, the input clock period is halved. Note to count thi

33、s factor on during the BLDC speed calculation. </p><p>  TMRPS: Select the TCNT counter clock source from eight settings. This setting determines the precision and the range during BLDC speed measurement. Se

34、e the example code below: </p><p>  P_TMR0_Ctrl, B.MODE = 0; // Normal Counting mode </p><p>  P_TMR0_Ctrl, B.CCLS = 6; // TCNT cleared by P_POSx_DectData (x = 0, 1)

35、</p><p>  // Each time position detection data change </p><p>  P_TMR0_Ctrl, B.CKEGS = 0; // Counting at rising edge </p><p>  P_TMR0_Ctrl, B.TMRPS = 3;

36、 // Select FCK/64 clock source </p><p>  1.3.2 Position Detection Control Register </p><p>  P_POSx_DectCtrl(x = 0, 1) </p><p>  Bit 15:14 </p><p>  SPLCK

37、: Sampling clock select. Select FCK/4, FCK/8, FCK/32, or FCK/128 for position sampling clock </p><p>  00 = FCK/4 </p><p>  01 = FCK/8 </p><p>  10 = FCK/32 </p><p>  1

38、1 = FCK/128</p><p><b>  Bit 13:12</b></p><p>  SPLMOD: Sampling mode select. Select one of three modes: sampling when PWM signal is active (PWM is on), sampling regularly, or samplin

39、g when lower side (UN, VN, WN) phases are conducting current. </p><p>  00 = Sample when UPWM/VPWM/WPWM bit is set in P_TMRx_OutputCtrl (x = 3, 4) register and generate the PWM waveform</p><p> 

40、 01 = Sample regularly </p><p>  10 = Sample when lower phases is in active state and conducting current </p><p>  11 = Reserved</p><p><b>  Bit 11:8</b></p><

41、p>  SPLCNT: Sampling count select. These bits select the sampling count for the valid external position detection signals. The position signals must be sampled continuously match as many times as the sampling count se

42、t, for the position signals to be considered valid. The valid settings are from 1 to 15 times. Note that count 0 and 1 are assumed to be one time.</p><p><b>  Bit : 7</b></p><p>  PD

43、EN: Position detection enable. This bit enables/disables the position detection function for position input pins TIOA~C. When enabled, the input signals of these pins will be sampled and the results will be latched to PD

44、R [2:0] bits in POS_DectData register. When disabled, PDR [2:0] will remain its status. </p><p>  0 = Disable </p><p>  1 = Enable</p><p><b>  Bit 6:0</b></p><

45、;p>  SPDLY: Sampling delay. These bits set a delay time clock in which at SPLCK clock source. It is used to stop sampling in order to prevent erroneous detection due to noise that occurs immediately after PWM output t

46、urns on.</p><p>  Position detection control register </p><p>  When the position detection changing event occurs, the P_TMRx_TCNT (x = 0, 1) value can be transferred to TGRA. If the position de

47、tection interrupt enable bit PDCIE is set to 1 in the corresponding P_TMRx_INT (x = 0, 1) register, the PDC interrupt routine will be called to process the data. </p><p>  SPLCK: Select sampling clock from F

48、CK/4, FCK/8, FCK/32, or FCK/128 for position sampling clock, which determines the detection precision of position change. Proper setting of SPLCK, SPLCNT and SPDLY will help to prevent erroneous detection and filter the

49、disturbance. </p><p>  SPLMOD: Select one of these three modes: sampling when PWM signal is active (PWM is on), sampling regularly, or sampling when lower side (UN, VN, WN) phases are conducting current. <

50、;/p><p>  SPLCNT: Sampling count select. The valid settings are from 1 to 15 times. Note that count 0 and 1 are both assumed to be one time. </p><p>  PDEN: This bit enables/disables the position d

51、etection function for position input pins TIOA~C. </p><p>  SPDLY: Sampling delay with the range of 0 to 127.</p><p>  The setting example is shown as blew. </p><p>  P_POS0_DectCtr

52、l, B.SPLCK = 2; // Count on FCK/32 </p><p>  P_POS0_DectCtrl, B.SPLMOD = 1; // Sample regularly </p><p>  P_POS0_DectCtrl, B.SPLCNT = 10;

53、 // Sample 10 times </p><p>  P_POS0_DectCtrl, B.PDEN = 1; // Enable position detection</p><p>  P_POS0_DectCtrl, B.SPDLY = 100; // Sample Delay</p>

54、<p>  1.4 Speed Calculation</p><p>  In order to obtain the exact parameters, the data must be filtered after captured. There are many filter algorithms, such as low-pass filter, moving average filter,

55、 median filter, average filter, limiting filtering, first-order filter, moving average filtering, etc. In general, the data can be considered valid after processed by these filters. Then the speed can be calculated by su

56、bstituting these parameters data in the formula. </p><p>  Assume Fcap is PDC capture clock frequency; p is the pole-pair of BLDC rotor; TCNT is cleared every m P_POSx_DectData (x = 0, 1) changes, that is, T

57、CNT is cleared at every rad rotation (m=1, 3, 6), and the position data is Ncap</p><p>  Since: (Formula 1- 1)</p><p><b>  and =, </b><

58、/p><p>  Since electrical degree = p x mechanical rotation then the mechanical angular </p><p>  velocity is (Formula 1- 2)</p><p>  with the u

59、nit of rad/min. Take n as the indicator. </p><p>  So: rad/min (Formula 1- 3) </p><p>  n summarize: rpm (Formula 1- 4) </p><p>  From t

60、he formula above, we can obverse that n is related to Fcap, m, Ncap and p (that is a constant when BLDC is selected) .</p><p>  Suppose there is a BLDC with 2 pole-pair, 4000rpm rated speed. We will show you

61、 how to set the parameters of Fcap and m. </p><p>  When m= 1, TCNT is cleared every time P_POSx_DectData (x = 0, 1) changes, , that is, TCNT is cleared for once every 60 electrical degree rotation of BLDC.

62、</p><p>  With a certain clock frequency, the motor rotation speed can be calculated by the Formula 1- 4 at the highest speed when Ncap is 1 and the lowest speed when Ncap is 0xffff. </p><p>  T

63、able 1-2 Motor Speed VS Clock Frequency</p><p> ?。繵hen m= 3, TCNT is cleared for once every 3 times P_POSx_DectData (x = 0, 1) changes, that is, TCNT is cleared every 180 electrical degree rotation of BLDC.

64、</p><p>  From the Formula 1- 4, we can see that the measurable motor speed when m= 3 is three times higher than that when m= 1, provided that other parameters are the same. </p><p> ?。繵hen m= 6

65、, TCNT is cleared every 6 times P_POSx_DectData (x = 0, 1) changes, that is, TCNT is cleared every 360 electrical degree rotation of BLDC.</p><p>  From the Formula 1- 4, we can see that the measurable motor

66、 speed when m= 6 is six times higher than that when m= 1, provides that other parameters are the same. </p><p>  Above all, it is better to set m= 1 to ensure the veracity of positions. Since the highest spe

67、ed can be applied, it is important to select the lowest speed. Assume the lowest measure speed is 200 rpm, we can set Fcap as FCK/16, FCK/64, FCK/256 or FCK/1024. FCK/16 is recommended to be selected for higher veracity.

68、</p><p>  1.5 Noise Immunity </p><p>  Through programming the bit value of SPLCNT (sampling count select) and SPDLY (sampling delay) in P_POSx_DectCtrl(x = 0, 1), users could avoid the erroneou

69、s detection due to noise that occurs immediately after PWM output turns on. It can ensure the correctness of speed measurement and phase commutation in BLDC . </p><p>  The valid settings are from 1 to 15 ti

70、mes. Note that count 0 and 1 are both assumed to be one time. These bits select the sampling count for the valid external position detection signals. The position signals must be sampled continuously match as many times

71、as the sampling count set, for the position signals to be considered valid. Then the sharp pulse can be filtered by this method. SPLCK selects the sampling clock. Figure 1-2 shows the sampling counting and Figure 1-3 sho

72、ws the noise immunity </p><p>  Figure 1-2 Sampling Counting </p><p>  Figure 1-3 Noise Immunity Pulse </p><p>  See Figure 1-2 , the SPLCNT setting is 10. When sampling the positio

73、n signal with the frequency that SPLCK selected, a high-to-low transition occurs in hall3 at 0 to1 counting. Then sample the hall signal for ten executive times. If they are all of the same value, the hall signal can be

74、considered valid. </p><p>  When SPLCNT setting is 10, a high-to-low transition occurs in hall3 at the first counting, while a low-to-high transition occurs at the fourth counting. Then reset the counter, sa

75、mple hall3 for ten executive times. If they are all of the same value, the position signals can be considered as 011b still. By this way, a sharp pulse occurring in the signals can be filtered, which prevents the positio

76、n signals from being disturbed. So the position signal will not be sampled if it varies quicker than </p><p>  2 Software Design </p><p>  2.1 Software Description </p><p>  This ap

77、plication note is designed for motor speed measurement when driving BLDC, which is performed by PDC position detection change interrupt. </p><p>  2.2 Source File </p><p>  2.3 DMC Interface<

78、/p><p>  Speed1_Now: Current speed by calculation </p><p>  User_R0: PDC Data captured by PDC interrupt </p><p>  2.4 Subroutines </p><p>  3 Design Tips </p><

79、;p>  3.1 Demo Listing </p><p>  /*= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */ </p><p>  // Example </p><p>  /*= = = = = = = = = = = = = =

80、= = = = = = = = = = = = = = = = = = = = = = = = = = */ </p><p>  #include "Spmc75_regs.h" </p><p>  #include "Spmc_typedef.h" </p><p>  #include "unspmacro.

81、h" </p><p>  #include "Spmc75_SPDET.h" </p><p><b>  main() </b></p><p><b>  { </b></p><p>  Spmc75_System_Init(); //System initia

82、lization </p><p><b>  while(1) </b></p><p><b>  { </b></p><p>  MC75_DMC_UART_Service(); //DMC service </p><p><b>  } </b></p>

83、<p><b>  } </b></p><p>  //= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</p><p>  // Description: IRQ1 interrupt source is XXX, used to X

84、XX </p><p>  // Notes: Speed measurement through PDC </p><p>  //= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = </p><p>  void IRQ1(void)__att

85、ribute__((ISR)); </p><p>  void IRQ1(void) </p><p><b>  { </b></p><p>  if(P_TMR0_Status, B.PDCIF && P_TMR0_INT, B.PDCIE) </p><p><b>  { </

86、b></p><p>  Spmc75_PDCETSPD_ISR(); // PDC capture interrupt for the motor speed calculation. </p><p><b>  } </b></p><p><b>  } </b></p><p>  

87、//= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = </p><p>  // Description: IRQ6 interrupt source is XXX, used to XXX </p><p>  // Notes: DMC receiving ISR &l

88、t;/p><p>  //= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = </p><p>  void IRQ6(void) __attribute__ ((ISR)); </p><p>  void IRQ6(void) </p>

89、<p><b>  { </b></p><p>  if(P_INT_Status, B.UARTIF) </p><p><b>  { </b></p><p>  if(P_UART_Status, B.RXIF) MC75_DMC_RcvStream(); </p><p>&l

90、t;b>  } </b></p><p><b>  } </b></p><p>  Sub-function for speed measurement </p><p>  #define TMRPSFCK (24.0E+6)/64 //Counter clock source </p><p>

91、  #define PAIRPOLE 2 //BLDC pole pairs </p><p>  #define PDCCLEAR 1 //CNT clear source </p><p>  #define SPDLIMIT 5000 //Define the highest motor speed to avoid the disturbance due to sharp puls

92、e </p><p>  #define RADIX (UInt32)((TMRPSFCK*60*PDCCLEAR) //(6*PAIRPOLE)) </p><p>  #define MAXRPM (UInt16)(RADIX/SPDLIMIT) </p><p>  static UInt16 a Filter[CAPBSIZE]; //Moving aver

93、age filter data </p><p>  static UInt16 *ptr = a Filter; //Pointer to array </p><p>  void Spmc75_PDCETSPD_ISR(void) </p><p><b>  { </b></p><p>  static UIn

94、t32 summation= 0; </p><p>  UInt16 original, uiSpeed; </p><p>  P_TMR0_Status, B.PDCIF = 1; // Clear interrupt flag </p><p>  original = P_TMR0_TGRA, W;

95、 //Read PDC captured data </p><p>  //Limit the highest speed </p><p>  if(original > P_TMR0_TCNT, W && original > MAXRPM) </p><p><b>  { </b></p>

96、<p>  //Accumulate the captured data and perform moving filter </p><p>  summation -= *ptr; </p><p>  *ptr = original; </p><p>  summation += *ptr; </p><p>  //L

97、oop the array </p><p>  if((++ptr) > (a Filter+CAPBSIZE-1)) ptr = a Filter;</p><p>  // Average the accumulation data </p><p>  original = (UInt16)(summation >> SHIFTDIV);

98、</p><p>  uiSpeed = (UInt32)RADIX/original; </p><p>  //Speed calculation </p><p>  SPMC_DMC_Save_Aux(0, original); </p><p>  //Transmit captured data to DMC </p>

99、<p>  SPMC_DMC_Save_SpdNow(1, uiSpeed); </p><p>  //Send data to DMC </p><p><b>  } </b></p><p><b>  } </b></p><p>  3.2 Main Process Des

100、cription </p><p>  The main program performs system initialization and DMC data detection. While the DMC data detection can also be performed in a timer interrupt with a certain frequency. Figure 3-1 shows t

101、he coding flow. </p><p>  Figure 3-1 Main Process </p><p>  3.3 ISR Description</p><p>  In PDC interrupt, system reads and filters the data, then calculates the motor speed. The co

102、ding flow is shown as Figure 3-2 . </p><p>  Figure 3-2 ISR Process </p><p>  3.4Testing Hardware </p><p>  This example is designed for the purpose of study and reference, so we si

103、mply need to input a position signal to test the system. The hardware connection is shown as Figure 3-3 . </p><p>  Figure 3-3 Test Hardware Connection </p><p>  Where, the position signal can b

104、e generated by MCU or special timing logic circuit instead of necessarily being the real signal from BLDC (see Figure 3-4 and Figure 3-5 ). The frequency of position detection change can be adjusted by the potentiometer

105、or ADC in MCU system </p><p>  Figure 3-4 Hall Signal </p><p>  Figure 3-4 shows the three position signals timing with the sequence of 010b, 011b, 001b, 101b, 100b, 110b. </p><p> 

106、 Figure 3-5 Hall signal </p><p>  Figure 3-5 shows Hall3, Hall2, Hall1 timing with the sequence of 110b, 100b, 101b, 001b, 011b, 010b. It is the same to test in real BLDC. The two timings present the differe

107、nt motor directions: move forward or move backward. </p><p>  The Hall.spj file in Appendix shows the code for simulating hall signal with SPMC75F2413A. We can use ADC0 voltage to simulate the speed variatio

108、n, where IOD15, IOD14 and IOD13 are corresponding to Hall3, Hall2 and Hall1 respectively and IOA0/AN0 is used for ADC conversion to adjust the simulated speed. </p><p>  用SPMC75的PDC定時(shí)器做BLDC電機(jī)的速度檢測(cè)</p>

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 眾賞文庫(kù)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論