Вы находитесь на странице: 1из 12

ACI

Description

Emulated (per-unit) 3-phase Induction Motor


This module implements a discrete equivalent of a 3-phase induction motor using trapezoidal approximation with predictor-corrector. The induction model is normalized by the adjustable base quantities of voltage, current, Torque, frequency, and flux linkage. The induction motor is modeled in the stationary reference frame. The outputs of this module are the stator currents, rotor flux linkages, electromagnetic Torque, electrically angular velocity, and actual rotor speed in rpm. All of these outputs are in per-unit except the actual rotor speed.
pu Ualpha Ubeta LoadTorque pu pu pu pu ACI pu pu pu pu Q0 Ialpha Ibeta PsiAlpha PsiBeta Torque Wr WrRpm

Availability

This IQ module is available in one interface format: 1) The C interface version

Module Properties

Type: Target Independent, Application Dependent Target Devices: x281x or x280x C Version File Names: aci.c, aci.h IQmath library files for C: IQmathLib.h, IQmath.lib

Item Code Size

C version 740/740 words

Comments

(x281x/x280x) Data RAM xDAIS ready XDAIS component Multiple instances Reentrancy

0 words No No Yes Yes IALG layer not implemented

Each pre-initialized _iq ACI structure consumes 46 words in the data memory
Code size mentioned here is the size of the calc() function

Interface C Interface Object Definition The structure of ACI object is defined by following structure definition typedef struct { _iq Ualpha; _iq Ubeta; _iq LoadTorque; _iq Ialpha; _iq Ibeta; _iq PsiAlpha; _iq PsiBeta; _iq Torque; _iq Wr; int32 WrRpm; _iq K1; _iq K2; _iq K3; _iq K4; _iq K5; _iq K6; _iq K7; _iq K8; _iq K9; _iq K10; Uint32 BaseRpm; _iq Alpha; void (*calc)(); } ACI; typedef ACI *ACI_handle; // Input: alpha-axis phase voltage // Input: beta-axis phase voltage // Input: load Torque // Output: alpha-axis phase current // Output: beta-axis phase current // Output: alpha-axis rotor flux // Output: beta-axis rotor flux // Output: electromagnetic Torque // Output: electrically angular velocity // Output: motor speed in rpm (Q0) // Parameter: constant using in rotor flux calculation // Parameter: constant using in rotor flux calculation // Parameter: constant using in rotor flux calculation // Parameter: constant using in stator current cal // Parameter: constant using in stator current cal // Parameter: constant using in stator current cal // Parameter: constant using in stator current cal // Parameter: constant using in Torque calculation // Parameter: constant using in rotor speed cal // Parameter: constant using in rotor speed cal // Parameter: base motor speed in rpm // Parameter: trapezoidal integration parameter (0-1) // Pointer to calculation function

C Interface

Module Terminal Variables/Functions


Item Inputs Name
Ualpha Ubeta LoadTorque Ialpha Ibeta PsiAlpha PsiBeta Torque Wr WrRpm K1 K2 K3 K4 K5 K6 K7 K8 K9 K10 BaseRpm

Description
alpha-axis phase voltage beta-axis phase voltage load Torque alpha-axis phase current beta-axis phase current alpha-axis rotor flux beta-axis rotor flux electromagnetic Torque electrically angular velocity motor speed in rpm constant using in rotor flux cal constant using in rotor flux cal constant using in rotor flux cal constant using in stator current cal constant using in stator current cal constant using in stator current cal constant using in stator current cal constant using in Torque cal constant using in rotor speed cal constant using in rotor speed cal base speed in rpm

Format*
GLOBAL_Q GLOBAL_Q GLOBAL_Q GLOBAL_Q GLOBAL_Q GLOBAL_Q GLOBAL_Q GLOBAL_Q GLOBAL_Q Q0 GLOBAL_Q GLOBAL_Q GLOBAL_Q GLOBAL_Q GLOBAL_Q GLOBAL_Q GLOBAL_Q GLOBAL_Q GLOBAL_Q GLOBAL_Q Q0

Range(Hex)
80000000-7FFFFFFF 80000000-7FFFFFFF 80000000-7FFFFFFF 80000000-7FFFFFFF 80000000-7FFFFFFF 80000000-7FFFFFFF 80000000-7FFFFFFF 80000000-7FFFFFFF 80000000-7FFFFFFF 80000000-7FFFFFFF 80000000-7FFFFFFF 80000000-7FFFFFFF 80000000-7FFFFFFF 80000000-7FFFFFFF 80000000-7FFFFFFF 80000000-7FFFFFFF 80000000-7FFFFFFF 80000000-7FFFFFFF 80000000-7FFFFFFF 80000000-7FFFFFFF 80000000-7FFFFFFF

Outputs

ACI parameter

GLOBAL_Q valued between 1 and 30 is defined in the IQmathLib.h header file.

Special Constants and Data types ACI The module definition is created as a data type. This makes it convenient to instance an interface to the 3-phase Induction Motor module. To create multiple instances of the module simply declare variables of type ACI. ACI_handle User defined Data type of pointer to ACI module ACI_DEFAULTS Structure symbolic constant to initialize ACI module. This provides the initial values to the terminal variables as well as method pointers.

Methods void aci_calc(ACI_handle); This definition implements one method viz., the Induction Motor computation function. The input argument to this function is the module handle. Module Usage Instantiation The following example instances two ACI objects ACI aci1, aci2;

C Interface

Initialization To Instance pre-initialized objects ACI aci1 = ACI_DEFAULTS; ACI aci2 = ACI_DEFAULTS; Invoking the computation function aci1.calc(&aci1); aci2.calc(&aci2);

Example The following pseudo code provides the information about the module usage. main() { aci1.K1 = parem1_1; . . . aci1.K10 = parem1_10; aci2.K1 = parem2_1; . . . aci2.K10 = parem2_10; } void interrupt periodic_interrupt_isr() { aci1.Ualpha = valpha1; aci1.Ubeta = vbeta1; aci1.LoadTorque = T_load1; aci2.Ualpha = valpha2; aci2.Ubeta = vbeta2; aci2.LoadTorque = T_load2; aci1.calc(&aci1); aci2.calc(&aci2); Ialpha1 = aci1.Ialpha; Ibeta1 = aci1.Ibeta; psi_alfa1 = aci1.PsiAlpha; psi_beta1 = aci1.PsiBeta; Wr1 = aci1.Wr; WrRpm1 = aci1.WrRpm; Ialpha2 = aci2.Ialpha; Ibeta2 = aci2.Ibeta; psi_alfa2 = aci2.PsiAlpha; psi_beta2 = aci2.PsiBeta; // Pass parameters to aci1 . . . // Pass parameters to aci1 // Pass parameters to aci2 . . . // Pass parameters to aci2

// Pass inputs to aci1 // Pass inputs to aci1 // Pass inputs to aci1 // Pass inputs to aci2 // Pass inputs to aci2 // Pass inputs to aci2 // Call compute function for aci1 // Call compute function for aci2 // Access the outputs of aci1 // Access the outputs of aci1 // Access the outputs of aci1 // Access the outputs of aci1 // Access the outputs of aci1 // Access the outputs of aci1 // Access the outputs of aci2 // Access the outputs of aci2 // Access the outputs of aci2 // Access the outputs of aci2

C Interface Wr2 = aci2.Wr; WrRpm2 = aci2.WrRpm; } // Access the outputs of aci2 // Access the outputs of aci2

Constant Computation Function Constant Computation Function Since the Induction motor module requires ten constants (K1,, K10) to be input basing on the machine parameters, base quantities, mechanical parameters, and sampling period. These ten constants can be internally computed by the C function (aci_const.c, aci_const.h). The followings show how to use the C constant computation function.

Object Definition The structure of ACI_CONST object is defined by following structure definition typedef struct { float32 Rs; float32 Rr; float32 Ls; float32 Lr; float32 Lm; float32 p; float32 B; float32 J; float32 Ib; float32 Vb; float32 Wb; float32 Tb; float32 Lb; float32 Ts; float32 K1; float32 K2; float32 K3; float32 K4; float32 K5; float32 K6; float32 K7; float32 K8; float32 K9; float32 K10; void (*calc)(); } ACI_CONST; // Input: Stator resistance (ohm) // Input: Rotor resistance (ohm) // Input: Stator inductance (H) // Input: Rotor inductance (H) // Input: Magnetizing inductance (H) // Input: Number of poles // Input: Damping coefficient (N.m.sec/rad) // Input: Moment of inertia of rotor mass (kg.m^2) // Input: Base phase current (amp) // Input: Base phase voltage (volt) // Input: Base electrically angular velocity (rad/sec) // Input: Base Torque (N.m) // Input: Base flux linkage (volt.sec/rad) // Input: Sampling period (sec) // Output: constant using in rotor flux calculation // Output: constant using in rotor flux calculation // Output: constant using in rotor flux calculation // Output: constant using in stator current calculation // Output: constant using in stator current calculation // Output: constant using in stator current calculation // Output: constant using in stator current calculation // Output: constant using in Torque calculation // Output: constant using in rotor speed calculation // Output: constant using in rotor speed calculation // Pointer to calculation function

typedef ACI_CONST *ACI_CONST_handle;

Constant Computation Function

Module Terminal Variables/Functions


Item Inputs Name
Rs Rr Ls Lr Lm p B J Ib Vb Wb Tb Lb Ts K1 K2 K3 K4 K5 K6 K7 K8 K9 K10

Description
Stator resistance (ohm) Rotor resistance (ohm) Stator inductance (H) Rotor inductance (H) Magnetizing inductance (H) Number of poles Damping coefficient (N.m.sec/rad) Moment of inertia (kg.m^2) Base phase current (amp) Base phase voltage (volt) Base electrical angular speed (rad/sec) Base Torque (N.m) Base flux linkage (volt.sec/rad) Sampling period (sec) constant using in rotor flux calculation constant using in rotor flux calculation constant using in rotor flux calculation constant using in stator current cal. constant using in stator current cal. constant using in stator current cal. constant using in stator current cal. constant using in Torque calculation constant using in rotor speed cal. constant using in rotor speed cal.

Format
Floating Floating Floating Floating Floating Floating Floating Floating Floating Floating Floating Floating Floating Floating Floating Floating Floating Floating Floating Floating Floating Floating Floating Floating

Range(Hex)
N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A

Outputs

Special Constants and Data types ACI_CONST The module definition is created as a data type. This makes it convenient to instance an interface to the 3-phase Induction Motor constant computation module. To create multiple instances of the module simply declare variables of type ACI_CONST. ACI_CONST_handle User defined Data type of pointer to ACI_CONST module ACI_CONST_DEFAULTS Structure symbolic constant to initialize ACI_CONST module. This provides the initial values to the terminal variables as well as method pointers.

Methods void aci_const_calc(ACI_CONST_handle); This definition implements one method viz., the Induction Motor constant computation function. The input argument to this function is the module handle.

Constant Computation Function

Module Usage Instantiation The following example instances two ACI_CONST objects ACI_CONST aci1_const, aci2_const; Initialization To Instance pre-initialized objects ACI_CONST aci1_const = ACI_CONST_DEFAULTS; ACI_CONST aci2_const = ACI_CONST_DEFAULTS; Invoking the computation function aci1_const.calc(&aci1_const); aci2_const.calc(&aci2_const);

Example The following pseudo code provides the information about the module usage. main() { aci1_const.Rs = Rs1; aci1_const.Rr = Rr1; aci1_const.Ls = Ls1; aci1_const.Lr = Lr1; aci1_const.Lm = Lm1; aci1_const.p = p1; aci1_const.B = B1; aci1_const.J = J1; aci1_const.Ib = Ib1; aci1_const.Vb = Vb1; aci1_const.Wb = Wb1; aci1_const.Tb = Tb1; aci1_const.Lb = Lb1; aci1_const.Ts = Ts1; aci2_const.Rs = Rs2; aci2_const.Rr = Rr2; aci2_const.Ls = Ls2; aci2_const.Lr = Lr2; aci2_const.Lm = Lm2; aci2_const.p = p2; aci2_const.B = B2; aci2_const.J = J2; aci2_const.Ib = Ib2; aci2_const.Vb = Vb2; aci2_const.Wb = Wb2; aci2_const.Tb = Tb2; aci2_const.Lb = Lb2; aci2_const.Ts = Ts2; // Pass floating-point inputs to aci1_const // Pass floating-point inputs to aci1_const // Pass floating-point inputs to aci1_const // Pass floating-point inputs to aci1_const // Pass floating-point inputs to aci1_const // Pass floating-point inputs to aci1_const // Pass floating-point inputs to aci1_const // Pass floating-point inputs to aci1_const // Pass floating-point inputs to aci1_const // Pass floating-point inputs to aci1_const // Pass floating-point inputs to aci1_const // Pass floating-point inputs to aci1_const // Pass floating-point inputs to aci1_const // Pass floating-point inputs to aci1_const // Pass floating-point inputs to aci2_const // Pass floating-point inputs to aci2_const // Pass floating-point inputs to aci2_const // Pass floating-point inputs to aci2_const // Pass floating-point inputs to aci2_const // Pass floating-point inputs to aci2_const // Pass floating-point inputs to aci2_const // Pass floating-point inputs to aci2_const // Pass floating-point inputs to aci2_const // Pass floating-point inputs to aci2_const // Pass floating-point inputs to aci2_const // Pass floating-point inputs to aci2_const // Pass floating-point inputs to aci2_const // Pass floating-point inputs to aci2_const

Optional Constant Computation Function aci1_const.calc(&aci1_const); aci2_const.calc(&aci2_const); // Call compute function for aci1_const // Call compute function for aci2_const

aci1.K1 = _IQ(aci1_const.K1); // Access the floating-point outputs of aci1_const . . . . . . aci1.K10 = _IQ(aci1_const.K10); // Access the floating-point outputs of aci1_const aci2.K1 = _IQ(aci2_const.K1); // Access the floating-point outputs of aci2_const . . . . . . aci2.K10 = _IQ(aci2_const.K10); // Access the floating-point outputs of aci2_const }

Technical Background

Technical Background The mathematic model of a 3-phase induction motor in the stationary reference frame is described by the fifth-order differential equations as follows:

= f 1 ( r , r , i s , r ) = r + r r + L m i s dt d r = f 2 ( r , r , i s , r ) = r r r + L m i s dt di s 1 = f 3 ( r , r , i s , v s , r ) = r r r i s + v s L s dt di s 1 = f 4 ( r , r , i s , v s , r ) = r r + r i s + v s L s dt np d r B (Te Tl ) = f 5 ( r , r , i s , i s , r ) = r + dt J J 3 Lmn p ( r i s r i s ) Te = 2 Lr
where = 1

d r

(1) (2) (3) (4) (5) (6)

Lm L2m R r + L2r R s L2m 1 Rr = , = , = , and = 2 Ls Lr r Lr L s L r L s L r

Equations (1)-(4) can be compactly reWritten in the state-space model as follows:

x = A( r ) x + Bu
r r where x = , i s i s A ( r ) = r r r r L m 0 0

(7)

0 0 0 1 L m , B= L s 0 0

0 0 0 , and 1 L s

v u = s . Then, the differential equations seen in equations (5) and (7) are discretized by v s
the trapezoidal integration method with the predictor-corrector. Predictors:

x p ( k ) = x(k 1) + T (A ( r ( k 1)) x( k 1) + Bu ( k ) )

(8)

np B (Te (k ) Tl (k ) ) r ,p (k ) = r (k 1) + T r (k 1) + J J
Correctors:

(9)

10

Technical Background

x( k ) = x( k 1) +

T (1 + a )(A ( r ( k 1))x p (k ) + Bu (k ) ) + 2 (1 a )(A ( r ( k 1))x( k 1) + Bu ( k ) )

(10)

n (1 + a ) B r ,p (k ) + p (Te (k ) Tl (k ) ) + J J T r (k ) = r (k 1) + 2 np B (1 a ) J r (k 1) + J (Te (k ) Tl (k ) ) 3 Lmn p ( r (k)i s (k) r (k)i s (k)) Te (k ) = 2 Lr

(11)

(12)

where T is sampling period (sec) and a is the weight of predictor in between 0 and 1. Next, the discretized equations in (10) and (11) are normalized by the base quantities of voltage ( Vb ), current ( I b ), flux linkage ( b ), Torque ( Tb ), and electrically angular velocity ( b ). As a result, the per-unit, discrete-time equations of induction motor can be summarized as follows: Predictors:

r ,p (k ) = r (k 1) K 1 r (k 1) + K 2 r (k 1) r (k 1) + K 3i s (k 1) r ,p (k ) = r (k 1) K 1 r (k 1) K 2 r (k 1) r (k 1) + K 3i s (k 1)

(13) (14)

i s ,p (k ) = i s (k 1) + K 4 r (k 1) K 5 r (k 1) r (k 1) K 6 i s (k 1) + K 7 v s (k ) (15) i s ,p (k ) = i s (k 1) + K 4 r (k 1) + K 5 r (k 1) r (k 1) K 6 i s (k 1) + K 7 v s (k ) (16)
r ,p (k ) = r (k 1) K 9 r (k 1) + K 10 (Te (k ) Tl (k ) )
(17)

Correctors:

r ,p (k ) = K 1 r ,p (k ) + K 2 r (k 1) r ,p (k ) + K 3 i s ,p (k ) r ,p (k ) = K 1 r ,p (k ) K 2 r (k 1) r ,p (k ) + K 3 i s ,p (k )

(18) (19) (20) (21) (22) (23) (24) (25)

i s ,p (k ) = K 4 r ,p (k ) K 5 r (k 1) r ,p (k ) K 6 i s ,p (k ) + K 7 v s (k ) i s ,p (k ) = K 4 r ,p (k ) + K 5 r (k 1) r ,p (k ) K 6 i s ,p (k ) + K 7 v s (k )
r ,p (k ) = K 9 r ,p (k ) + K 10 (Te (k ) Tl (k ) )

r (k ) = K 1 r (k 1) + K 2 r (k 1) r (k 1) + K 3i s (k 1) r (k ) = K 1 r (k 1) K 2 r (k 1) r (k 1) + K 3i s (k 1)

i s (k ) = K 4 r (k 1) K 5 r (k 1) r (k 1) K 6 i s (k 1) + K 7 v s (k )

i s (k ) = K 4 r (k 1) + K 5 r (k 1) r (k 1) K 6 i s (k 1) + K 7 v s (k ) (26)

11

Technical Background

r (k ) = r (k 1) + 0.5((1 + a ) r ,p (k ) + (1 a ) r (k ) )

r (k ) = K 9 r (k 1) + K 10 (Te (k ) Tl (k ) ) r (k ) = r (k 1) + 0.5((1 + a ) r ,p (k ) + (1 a ) r (k ) )

(27) (28) (29) (30) (31) (32) (33)

i s (k ) = i s (k 1) + 0.5((1 + a )i s ,p (k ) + (1 a )i s (k ) )
r (k ) = r (k 1) + 0.5((1 + a ) r ,p (k ) + (1 a ) r (k ) )

i s (k ) = i s (k 1) + 0.5((1 + a )i s ,p (k ) + (1 a )i s (k ) )

Te = K 8 ( r (k )i s (k ) r (k )i s (k ) ) K 2 = T b , K 3 = T L m
Ib , b

where

K 1 = T ,

K 4 = T

b , Ib

K 5 = T

b b , Ib

K 6 = T , K 7 = T

n p Tb L I B 1 Vb , K 8 = 1.5n p m b b , K 9 = T , K 10 = T L r Tb L s I b J J b

Table 1 shows the correspondence of notation between variables used here and variables used in the program (i.e., aci.c, aci.h). The software module requires that both input and output variables are in per unit values.

Equation Variables

v s
Inputs

Program Variables Ualpha Ubeta LoadTorque Ialpha Ibeta PsiAlpha PsiBeta Torque Wr K1 K2 K3 K4 K5 K6 K7 K8 K9 K10 Alpha

v s
Tl i s

i s
Outputs

r r Te
r
K1 K2 K3 K4 K5 K6 K7 K8 K9 K10 a Table 1: Correspondence of notations

Others

12

Вам также может понравиться