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

📄 aci_mras.lst

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

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

       1            ;=====================================================================================
       2            ; File name:        ACI_MRAS.ASM                     
       3            ;                    
       4            ; Originator:   Digital Control Systems Group
       5            ;                       Texas Instruments
       6            ;
       7            ; Description:                                   
       8            ; Reactive power model reference adaptive system (MRAS) speed 
       9            ;               estimator of induction motor 
      10            ;=====================================================================================
      11            ; History:
      12            ;-------------------------------------------------------------------------------------
      13            ; 9-15-2000     Release Rev 1.0
      14            ;================================================================================
      15            ; Applicability: F240,F241,C242,F243,F24xx.  (Peripheral Independent).
      16            ;================================================================================
      17            ; Routine Name: aci_mras_calc                                              Type: C Callable
      18            ;  
      19            ;  C prototype : void aci_mras_calc(struct ACIMRAS *p);
      20            ;
      21            ;        The struct object is defined in the header file "aci_mras.h" as follows:
      22            ;
      23            ; typedef struct { int  ualfa_mras;     /* Input: alfa-axis phase voltage at k (Q15) */
      24            ;                                 int  ubeta_mras;              /* Input: beta-axis phase voltage at k (Q15) */
      25            ;                                 int  ialfa_mras;              /* Input: alfa-axis line current at k (Q15) */  
      26            ;                                 int  ibeta_mras;              /* Input: beta-axis line current at k (Q15) */
      27            ;                                 int  ialfa_old;               /* History: alfa-axis line current at k-1 (Q15) 
      28            ;                                 int  ibeta_old;               /* History: beta-axis line current at k-1 (Q15) 
      29            ;                             int  imalfa_old_high; /* History: alfa-axis magnetizing current at k-1 (Q31) */
      30            ;                             int  imalfa_old_low;  /* History: alfa-axis magnetizing current at k-1 (Q31) */
      31            ;                             int  imbeta_old_high; /* History: beta-axis magnetizing current at k-1 (Q31) */
      32            ;                             int  imbeta_old_low;  /* History: beta-axis magnetizing current at k-1 (Q31) */
      33            ;                             int  imalfa_high;     /* Variable: alfa-axis magnetizing current at k (Q31) */
      34            ;                             int  imalfa_low;      /* Variable: alfa-axis magnetizing current at k (Q31) */
      35            ;                             int  imbeta_high;     /* Variable: beta-axis magnetizing current at k (Q31) */
      36            ;                             int  imbeta_low;      /* Variable: beta-axis magnetizing current at k (Q31) */
      37            ;                             int  ealfa;                       /* Variable: alfa-axis back emf at k (Q15) */
      38            ;                             int  ebeta;                       /* Variable: beta-axis back emf at k (Q15) */
      39            ;                             int  q;                           /* Variable: reactive power in reference model (
      40            ;                             int  q_hat;                       /* Variable: reactive power in adaptive model  (
      41            ;                             int  error;                       /* Variable: reactive power error (Q15) */      
      42            ;                             int  K1;                          /* Parameter: constant using in reference model 
      43            ;                             int  K2;                          /* Parameter: constant using in adaptive model (
      44            ;                             int  K3;                          /* Parameter: constant using in adaptive model (
      45            ;                             int  K4;                          /* Parameter: constant using in adaptive model (
      46            ;                             int  K5;                          /* Parameter: constant using in adaptive model (
      47            ;                             int  K6;                          /* Parameter: constant using in adaptive model (
      48            ;                             int  K7;                          /* Parameter: constant using in adaptive model (
      49            ;                             int  Kp;                          /* Parameter: proportioanl gain  (Q15) */
      50            ;                             int  Ki_high;                     /* Parameter: integral gain (Q31) */
      51            ;                             int  Ki_low;                      /* Parameter: integral gain (Q31) */
      52            ;                             int  base_rpm;            /* Parameter: base motor speed in rpm (Q3) */           
      53            ;                                 int  wr_hat_mras;             /* Output: estimated (per-unit) motor speed (Q15
      54            ;                                 int  wr_hat_rpm_mras; /* Output: estimated (rpm) motor speed (Q0) */
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00  Tue May  6 12:41:14 2003
Copyright (c) 1987-1999  Texas Instruments Incorporated 
aci_mras.asm                                                         PAGE    2

      55            ;                                 int  (*calc)();           /* Pointer to calculation function */ 
      56            ;                               } ACIMRAS;                            
      57            ;                        
      58            ;        Frame Usage Details:
      59            ;     step   |      a      |      b       |      c       |     d     
      60            ;____________|_____________|______________|______________|_____________
      61            ;     FR0        |  tmp2_low   |  tmp1_high   |  tmp1_high   |     
      62            ;     FR1        |  tmp2_high  |  tmp1_low    |  tmp1_low        |     
      63            ;     FR2        |    sign1    |    tmp4      |  tmp2_high   |                  
      64            ;     FR3        |  tmp1_low   |    sign1     |  tmp2_low    |     
      65            ;     FR4        |  tmp1_high  |    sign2     |    sign1     |     
      66            ;     FR5        |    tmp5     |    sign3     |              |     
      67            ;     FR6        |    tmp4     |    tmp5      |                          |     
      68            ;     FR7        |             |  tmp2_low    |              |                  
      69            ;     FR8        |             |  tmp2_high   |              |     
      70            ;     FR9        |             |  tmp3_low    |              |     
      71            ;     FR10       |             |  tmp3_high   |              |     
      72            ;------------|-------------|--------------|--------------|
      73            ;sub section | REF_MODEL   |  ADT_MODEL   |   PI_MRAS    |      
      74            ;
      75            ;================================================================================
      76                            .def        _aci_mras_calc
      77            ;================================================================================
      78      000b  __aci_mras_calc_framesize .set 000Bh
      79            ;----------------------------------------------------------------------------------
      80      0001  ref_model_              .set    1               ; set 1 to activate reference model, otherwise set 0
      81      0001  adt_model_              .set    1               ; set 1 to activate adaptive model, otherwise set 0
      82      0001  pi_mras_                .set    1               ; set 1 to activate PI controller, otherwise set 0
      83            
      84            ; Important!! Note that the default config is set all 1, if it is neccessary to be 
      85            ; changed, the module library (e.g., clib_010.lib) must be rebuilt to take the effect.  
      86            ;================================================================================
      87 0000       _aci_mras_calc:
      88                                                                                                                    ; Assume
      89 0000 8aa0          POPD    *+                                                                      ; Keep return address
      90 0001 80a0          SAR     AR0,*+                                                          ; Keep old frame pointer (FP)
      91 0002 8180          SAR     AR1,*                                                           ; Keep old stack pointer (SP)
      92 0003 b00b          LARK    AR0,__aci_mras_calc_framesize                   ; Load AR0 with frame size      
      93 0004 00e8          LAR     AR0,*0+,AR0                                                     ; AR0->FP0 (new FP), ARP=AR0
      94            
      95            ;================================================================================
      96 0005 7c03                  SBRK    #3              ; ARP=AR0, AR0->FR0-3 (1st argument)            
      97            ;----------------------------------------------------------------------------------
      98 0006 0280                  LAR             AR2,*   ; ARP=AR0, AR0->ualfa_mras, AR2->ualfa_mras                     
      99            ;----------------------------------------------------------------------------------
     100 0007 0380                  LAR             AR3,*   ; ARP=AR0, AR0->ualfa_mras, AR2->ualfa_mras, AR3->ualfa_mras            
     101            ;----------------------------------------------------------------------------------
     102 0008 7803                  ADRK    #3              ; ARP=AR0, AR0->FR0, AR2->ualfa_mras, AR3->ualfa_mras
     103            ;----------------------------------------------------------------------------------
     104 0009 8b8b                  MAR             *,AR3   ; ARP=AR3, AR0->FR0, AR2->ualfa_mras, AR3->ualfa_mras
     105            ;----------------------------------------------------------------------------------
     106 000a 7813          ADRK    #19             ; ARP=AR3, AR0->FR0, AR2->ualfa_mras, AR3->K1 
     107            ;----------------------------------------------------------------------------------
     108 000b 8b8a          MAR             *,AR2   ; ARP=AR2, AR0->FR0, AR2->ualfa_mras, AR3->K1
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00  Tue May  6 12:41:14 2003
Copyright (c) 1987-1999  Texas Instruments Incorporated 
aci_mras.asm                                                         PAGE    3

     109            ;----------------------------------------------------------------------------------
     110 000c be47          SETC    SXM             ; Turn sign extension mode on
     111                                                    ; ARP=AR2, AR0->FR0, AR2->ualfa_mras, AR3->K1
     112            ;----------------------------------------------------------------------------------
     113 000d be43                  SETC    OVM             ; Set overflow mode
     114                                                            ; ARP=AR2, AR0->FR0, AR2->ualfa_mras, AR3->K1
     115            ;----------------------------------------------------------------------------------
     116 000e bf00                  SPM     0       ; Reset product mode
     117                                                    ; ARP=AR2, AR0->FR0, AR2->ualfa_mras, AR3->K1 

⌨️ 快捷键说明

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