⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 aci_fe.lst

📁 TI的digital motor control lib的源代码。了解TI的编程规范
💻 LST
📖 第 1 页 / 共 5 页
字号:
C:\TIC2XX\C2000\CGTOOLS\BIN\DSPA.EXE -q -v2xx -gs aci_fe.asm -o ..\obj\aci_fe.obj -l ..\temp\aci_fe.lst 

TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00  Tue May  6 12:41:25 2003
Copyright (c) 1987-1999  Texas Instruments Incorporated 
aci_fe.asm                                                           PAGE    1

       1            ;=====================================================================================
       2            ; File name:        ACI_FE.ASM                     
       3            ;                    
       4            ; Originator:   Digital Control Systems Group
       5            ;                       Texas Instruments
       6            ;
       7            ; Description:  Flux Estimator of Induction Motor                
       8            ;
       9            ; Note  0000h < theta_r_fe < 7FFFh 
      10            ;     (i.e. equivalent to 0 < theta_r_fe < 360 deg)
      11            ; 
      12            ;=====================================================================================
      13            ; History:
      14            ;-------------------------------------------------------------------------------------
      15            ; 02-08-2001    Release Rev 1.0
      16            ;================================================================================
      17            ; Applicability: F240,F241,C242,F243,F24xx.  (Peripheral Independent).
      18            ;================================================================================
      19            ; Routine Name: aci_fe_calc                                                                         Type: C Call
      20            ;  
      21            ;  C prototype : void aci_fe_calc(struct ACIFE *p);
      22            ;
      23            ;        The struct object is defined in the header file "aci_fe.h" as follows:
      24            ;
      25            ; typedef struct { int  theta_r_fe;      /* Output: Rotor flux angle (Q15) */
      26            ;                     int  i_qs_fe;                     /* Input: Stationary q-axis stator current (Q15) */
      27            ;                     int  i_ds_fe;         /* Input: Stationary d-axis stator current (Q15) */
      28            ;                 int  K1_fe;           /* Parameter: Constant using in current model (Q15) */
      29            ;                     int  flx_dr_e         /* Variable: Rotating d-axis rotor flux (current model) (Q15) */
      30            ;                     int  K2_fe;           /* Parameter: Constant using in current model (Q15) */
      31            ;                     int  flx_qr_s;        /* Variable: Stationary q-axis rotor flux (current model) (Q15) */
      32            ;                     int  flx_dr_s;        /* Variable: Stationary d-axis rotor flux (current model) (Q15) */
      33            ;                     int  K3_fe;           /* Parameter: Constant using in stator flux computation (Q15) */
      34            ;                     int  K4_fe;           /* Parameter: Constant using in stator flux computation (Q15) */
      35            ;                     int  flx_ds_s;        /* Variable: Stationary d-axis stator flux (current model) (Q15) */
      36            ;                     int  flx_qs_s;        /* Variable: Stationary q-axis stator flux (current model) (Q15) */
      37            ;                                 int  psi_ds_fe;               /* Variable: Stationary d-axis stator flux (volt
      38            ;                     int  Kp_fe;           /* Parameter: PI proportionnal gain (Q15) */
      39            ;                     int  ui_lo_ds;        /* Variable: Stationary d-axis integral term (Q30) */
      40            ;                     int  ui_hi_ds;        /* Variable: Stationary d-axis integral term (Q30) */
      41            ;                     int  ucomp_ds;        /* Variable: Stationary d-axis compensated voltage (Q15) */
      42            ;                     int  Ki_fe;           /* Parameter: PI integral gain (Q31-16bit) */
      43            ;                     int  psi_qs_fe;       /* Variable: Stationary q-axis stator flux (voltage model) (Q31) */
      44            ;                     int  ui_lo_qs;        /* Variable: Stationary q-axis integral term (Q30) */
      45            ;                     int  ui_hi_qs;        /* Variable: Stationary q-axis integral term (Q30) */
      46            ;                     int  ucomp_qs;        /* Variable: Stationary q-axis compensated voltage (Q15) */
      47            ;                     int  emf_ds           /* Variable: Stationary d-axis back emf (Q15) */
      48            ;                     int  u_ds_fe;         /* Input: Stationary d-axis stator voltage (Q15) */
      49            ;                     int  K5_fe;           /* Parameter: Constant using in back emf computation (Q15) */
      50            ;                     int  K6_fe;           /* Parameter: Constant using in back emf computation (Q15) */
      51            ;                                 int  psi_ds_lo;               /* Variable: Stationary d-axis stator flux (volt
      52            ;                     int  emf_qs           /* Variable: Stationary q-axis back emf (Q15) */
      53            ;                     int  u_qs_fe;         /* Input: Stationary q-axis stator voltage (Q15) */
      54            ;                                 int  psi_qs_lo;               /* Variable: Stationary q-axis stator flux (volt
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00  Tue May  6 12:41:25 2003
Copyright (c) 1987-1999  Texas Instruments Incorporated 
aci_fe.asm                                                           PAGE    2

      55            ;                     int  K8_fe;           /* Parameter: Constant using in rotor flux computation (Q15) */
      56            ;                     int  K7_fe;           /* Parameter: Constant using in rotor flux computation (Q14) */
      57            ;                                 int  psi_dr_fe;               /* Output: Stationary d-axis estimated rotor flu
      58            ;                                 int  psi_qr_fe;               /* Output: Stationary q-axis estimated rotor flu
      59            ;                                 int  (*calc)();               /* Pointer to calculation function */ 
      60            ;                                } ACIFE;                   
      61            ;
      62            ;                        
      63            ;        Frame Usage Details:
      64            ;     step   |      a      |      b       |      c       |     d     
      65            ;____________|_____________|______________|______________|_____________
      66            ;     AR0        |  tmp1_fe(1) |   ptr_fe(1)  |                          |     
      67            ;     AR1        | cos_fe(1,3) |  error_ds(5) |  error_qs(5) | ptr_fe(8)    
      68            ;     AR2        | sin_fe(1,3) |  tmp1_fe(5)  |   tmp1_fe(5) | psi_qdr(8)    
      69            ;     AR3        |   i_ds_e(1) |  tmp1_fe(6)  |  psi_dr_p(8) |     
      70            ;     AR4        |   i_qs_e(1) |  psi_qr_p(8) |                          |     
      71            ;
      72            ;================================================================================
      73                            .def        _aci_fe_calc
      74                            .ref            SINTAB_360          ; Sine look-up table (256 entries)  
      75                            .ref            ATANTAB_45          ; ArcTan look-up table (256 entries)        
      76            ;================================================================================
      77      0005  __aci_fe_calc_framesize .set 0005h
      78            ;================================================================================
      79 0000       _aci_fe_calc:
      80                                                                                                                    ; Assume
      81 0000 8aa0          POPD    *+                                                                      ; Keep return address
      82 0001 80a0          SAR     AR0,*+                                                          ; Keep old frame pointer (FP)
      83 0002 8180          SAR     AR1,*                                                           ; Keep old stack pointer (SP)
      84 0003 b005          LARK    AR0,__aci_fe_calc_framesize             ; Load AR0 with frame size      
      85 0004 00e8          LAR     AR0,*0+,AR0                                                     ; AR0->FP0 (new FP), ARP=AR0
      86            
      87            ;================================================================================
      88 0005 7c03                  SBRK    #3              ; ARP=AR0, AR0->FR0-3 (1st argument)            
      89            ;----------------------------------------------------------------------------------
      90 0006 0280                  LAR             AR2,*   ; ARP=AR0, AR0->theta_r_fe, AR2->theta_r_fe
      91            ;----------------------------------------------------------------------------------
      92 0007 7803                  ADRK    #3              ; ARP=AR0, AR0->FR0, AR2->theta_r_fe
      93            ;----------------------------------------------------------------------------------
      94 0008 8b8a                  MAR             *,AR2   ; ARP=AR2, AR0->FR0, AR2->theta_r_fe
      95            ;----------------------------------------------------------------------------------
      96 0009 be47                  SETC    SXM             ; Turn sign extension mode on
      97                                                            ; ARP=AR2, AR0->FR0, AR2->theta_r_fe
      98            ;----------------------------------------------------------------------------------
      99 000a be43                  SETC    OVM             ; Set overflow mode
     100                                                            ; ARP=AR2, AR0->FR0, AR2->theta_r_fe
     101            ;----------------------------------------------------------------------------------
     102 000b bf00                  SPM     0       ; Reset product mode
     103                                                    ; ARP=AR2, AR0->FR0, AR2->theta_r_fe
     104            ;----------------------------------------------------------------------------------
     105            ; (1) Park transformation on the measured stator current
     106            ;----------------------------------------------------------------------------------
     107 000c 1088                  LACC    *,AR0   ; ACC = theta_r_fe   (Q15)
     108                                                            ; ARP=AR2, AR0->FR0, AR2->theta_r_fe, ARP=AR0
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00  Tue May  6 12:41:25 2003
Copyright (c) 1987-1999  Texas Instruments Incorporated 
aci_fe.asm                                                           PAGE    3

     109            ;----------------------------------------------------------------------------------
     110 000d bf90              ADD         #8192   ; ACC = theta_r_fe + 90 deg (cos(A)=sin(A+90)) (Q15)
         000e 2000  
     111                                                    ; ARP=AR0, AR0->FR0, AR2->theta_r_fe
     112            ;----------------------------------------------------------------------------------
     113 000f bfb0          AND             #07FFFh ; Force positive wrap-around
         0010 7fff  
     114                                                    ; ARP=AR0, AR0->FR0, AR2->theta_r_fe 
     115            ;----------------------------------------------------------------------------------
     116 0011 9080                  SACL    *               ; FR0 = tmp1_fe = theta_r_fe + 90 deg
     117                                                            ; ARP=AR0, AR0->FR0, AR2->theta_r_fe            
     118            ;----------------------------------------------------------------------------------
     119 0012 1980                  LACC    *,9             ; ACC = (theta_r_fe+90 deg)/128
     120                                                            ; ARP=AR0, AR0->FR0, AR2->theta_r_fe
     121            ;----------------------------------------------------------------------------------
     122 0013 9880          SACH    *               ; FR0 = ptr_fe = Table pointer for cos

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -