uploadedfile_129768102762650530

Download UploadedFile_129768102762650530

If you can't read please download the document

Upload: mahendra-kumar

Post on 22-Oct-2014

23 views

Category:

Documents


0 download

TRANSCRIPT

Electrical Drives Electrical Drives MEP 1422 2004/2005-02 Module 1.Introduction to drives: Elements in electrical drives, overview of DC and AC drives. Torque equations, Components of load torque, torque characteristics. Four-quadrant operation Notes on Introduction to Electromechanical Energy Conversion Converters in electric drive systems: Controlled rectifier, Linear scheme, Non-linear scheme, Switched-mode converters - average model and transfer function, Two-quadrant converters, Four-quadrant converters, Bipolar switching, Unipolar switching, Current-controlled converters, Fixed switching frequency control, Hysteresis control Example of Simulink file for 2-Q converter (switching and average model) Current ripple in 4 Q converter Space Vector Modulation (SVM) DC motor drives DC drives in power point format, in .pdf Construction, modeling and transfer function, Converters for DC drives quadrant of operations. MATLABbased controller design method here Linear analysis in Simulink Large signal simulation using SIMULINK here Module 2 Module 3 http://encon.fke.utm.my/courses/mep1422/modules.html (1 von 2) [17.05.2005 17:09:50] Electrical Drives Module 4.Induction motor drives Dynamic model of induction machine Construction and principle of operations, Speed Control- constant V/f, Scalar control problems at low speed, current Simulink example on open-loop constant V/Hz using SIMULINK s-function for IM simulation Compiled with Borland C - here Current controlled and voltage boost, open-loop and closed-loop control. Field-oriented control of IM: Rotor flux orientation Stator flux orientation Simulink example on indirect FOC IM requires imch.dll PPoint for principles of direct torque control and in pdf Direct Torque Control using SIMULINK and the required *.dll files for the S-function http://encon.fke.utm.my/courses/mep1422/modules.html (2 von 2) [17.05.2005 17:09:50] & ) , ' ( !" ) * * ! (& + & # $% ) ) * * - $ # . - & & # # # % # & ! / # 0 # 1 & 2$% 0 0 . ) / 0 $ # # # * # % ( 0 0 & ' 0 0 $% 2 & & ' ! - # * ! 0* 0 3 # & $ # # 4567 % # # # 2 $ $/: % $ & %% 4587 # # $* % 9 # ) ; /# 0 $%0 0 #$% 0 . # 0 0 0 0 #$ , #$%& ' / ) ( * (! A 1 J ( \ * * Te = Tl + d (J( m ) dt . vtri, upper switch ON when vc < vtri, lower switch ON Modeling of Converters and DC motor Switchmode converters averaged model Ttri vc q d 1 d= Ttri + t + Ttri t t on qdt = Ttri Vdc dt = dVdc Vdc Vt 1 Vt = Ttri + dTtri 0 Modeling of Converters and DC motor Switchmode converters averaged model d 1 0.5 -Vtri,p 0 Vtri,p vc vc d = 0.5 + 2Vtri,p Vdc Vt = 0.5Vdc +vc 2Vtri,p Modeling of Converters and DC motor DC motor small signal model di a v t = ia R a + L a+ ea dt Te = kt ia d(m Te = Tl + J dt ee = k t ( Extract the dc and ac components by introducing small perturbations in Vt, ia, ea, Te, TL and (m ac components ~ ~ = ~ R + L d ia + ~v t ia aeaadt dc components Vt = Ia R a + E a Te = k E Ia Ee = k E ( ~~ Te = k E ( ia ) ~ = k (()~ eeE ~ d (( )~~ ~ Te = TL + B ( + J dt Te = TL + B(() Modeling of Converters and DC motor DC motor small signal model Perform Laplace Transformation on ac components ~ ~ = ~ R + L d ia + ~v t ia aeaadtVt(s) = Ia(s)Ra + LasIa + Ea(s) Te(s) = kEIa(s) Ea(s) = kE((o) ~~ Te = k E ( ia ) ~ = k ( ()~ eeE ~ d (( )~~ ~ Te = TL + B ( + J dt Te(s) = TL(s) + B(s) + sJ(s) Modeling of Converters and DC motor DC motor small signal model Tl (s ) Va (s ) + - Ra 1 + sL a I a (s ) kT Te (s ) + - 1 B + sJ ( (s ) kE CLOSED-LOOP SPEED CONTROL Cascade control structure \* + - position controller (* + - speed controller T* + - torque controller converter Motor tacho kT 1/s The control variable of inner loop (e.g. torque) can be limited by limiting its reference value It is flexible outer loop can be readily added or removed depending on the control requirements CLOSED-LOOP SPEED CONTROL Design procedure in cascade control structure Inner loop (current or torque loop) the fastest largest bandwidth The outer most loop (position loop) the slowest smallest bandwidth Design starts from torque loop proceed towards outer loops CLOSED-LOOP SPEED CONTROL Closed-loop speed control an example OBJECTIVES: Fast response large bandwidth Minimum overshoot good phase margin (>65o) Zero steady state error very large DC gain BODE PLOTS METHOD Obtain linear small signal model Design controllers based on linear small signal model Perform large signal simulation for controllers verification CLOSED-LOOP SPEED CONTROL Closed-loop speed control an example Permanent magnet motors parameters Ra = 2 & B = 1 x104 kg.m2/sec ke = 0.1 V/(rad/s) Vd = 60 V fs = 33 kHz PI controllers Switching signals from comparison of vc and triangular waveform La = 5.2 mH J = 152 x 106 kg.m2 kt = 0.1 Nm/A Vtri = 5 V CLOSED-LOOP SPEED CONTROL Torque controller design vtri Torque controller q + Vdc Tc+ q DC motor Converter Tl (s ) kt T e (s ) + Torque controller - V dc V tri ,peak Va (s ) + Ra Ia (s ) 1 + sL a kT Te (s ) - - + 1 B + sJ ( (s ) kE CLOSED-LOOP SPEED CONTROL Torque controller design Open-loop gain 150 Bode Dia gram From: Input Point To: Output Point 100 Magnitude (dB) kpT= 90 compensated 50 kiT= 18000 0 -50 90 45 Pha s e (deg) 0 -45 -90 10 compensated -2 10 -1 10 0 10 1 10 2 10 3 10 4 10 5 Frequency (rad/s ec ) CLOSED-LOOP SPEED CONTROL Speed controller design Assume torque loop unity gain for speed bandwidth (r a t ed , m a gn it u d volt a n d it et a p k a n t a p i fr ek u en s i d in a ik k a n , oleh it u torqu e ca p a b ility m en gu r a n g k er a n a flu k s m u la m en gu r a n g Vs Vs , r a t ed f fr a t ed Bila la ju k ecil, k eja t u h a n volt a n oleh R s d a n Xls a d a la h b es a r jik a d ib a n d in gk n d en ga n Vs . Oleh it u k eb ia s a a n n ya Vs d in a ik k a n leb ih b es a r s ed ik it (b oos t ) s em a s a fr equ en s i r en d a h Cir i T- ( b ila m a gn it u d Vs d a n f d iu b a h b er k a d a r a n T TL T,r a t ed Vs (r ,r a t ed (r (s ,r a t ed (r Ba ga im a n a k a h m a gn it u d d a n fr ek u en s i d ik a wa l s er en t a k ? Men ggu n a k a n Pu ls e Wid t h Mod u la t ion (PWM) In ver t er 5 Fixed AC. ACDC (r ect ifier ) PWM in ver t er IM Va r ia b le volt a ge Va r ia b le fr eq. Con t r ol (f a n d V) Ex am ple 1 4 0 0 V, Rs = 2 &, 4 SROH1370 rpm Xls = Xlr = 3 .5 & 5 0 Hz Rr = 3 &, Mot or is con t r olled b y a volt a ge s ou r ce in ver t er wit h con s t a n t V/ f. Ca lcu la t e: (a )S p eed for fr equ en cy of 3 0 Hz a n d 8 0 % of fu ll loa d (b )Fr equ en cy for a s p eed of 1 0 0 0 r p m a n d fu ll loa d t or qu e (c)Tor qu e for a fr equ en cy of 4 0 Hz a n d s p eed of 1 1 0 0 r p m (a ) 3 0 Hz Tr a t ed 0 .8 Tr a t ed 5 0 Hz Ra ted s lip s p eed Ns lip ,0 .8 1500 Tr a t ed Ns lip , r a t ed Ns lip ,r a t ed = Ns 1r ,r a t ed = 1 5 0 0 USP = 0 . 8 Tr a t ed N s lip ,0 . 8 4 Ns lip , 0 . 8 = 0 . 8 Tr a t ed Ns lip , r a t ed = 0 . 8 (1 3 0 ) = 1 0 4 r p m Tr a t ed Pa d a 3 0 Hz, la ju s eger a k ia la h 3 0 x 6 0 = 1 8 0 0 / 2 = 9 0 0 r p m 6 4Nr = Ns 1s lip = 9 0 0 0 4 = 7 9 6 r p m (b ) Tr a t ed ? Hz5 0 Hz 1000Ns13701500 Ns lip ,ra ted = 130 rpm Ns = 1 3 0 + 1 0 0 0 = 1 1 3 0 r p m Ns lip ,ra ted = 130 Ns = 2 f 60 p 4 f = 3 7 .6 7 Hz (c) 4 0 Hz Tr a t ed T=? 5 0 Hz 1100 Ns Ns lip 13701500 Ns = 2 f 60 p 4 Ns = 1 2 0 0 r p m Ns lip ,ra ted = 130 rpm Ns lip = 1 2 0 0 USP 7 Tr a t edT = 130100 Tr a t ed d ip er oleh i d a r i : 4T = 0 .7 6 9 Tr a t edTr a t ed = ? Tem 3RrVs2 = 2s (s Rr |2| + (X ls + X lr )Rs + s . Tr a t ed = 3 8 .0 6 Nm 4 Da ya k ila s p a d a 4 0 Hz, la ju 1 1 0 0 r p m ia la h T = 0 .7 6 9 (3 8 .0 6 ) = 2 9 .2 6 7 Nm Example 2 A 4pole, 3-phase, 50 Hz IM, 1460 rpm has a rated torque of 20 Nm. It is used to drive a load with characteristic given by TL = K(2 , such that the speed equals rated value at rated torque. If a constant V/Hz control method is used, find the speed of motor at 0.5 rated torque. If the starting torque of 1.1 times the rated is required, what should be the starting frequency? TL(Nm) 5 0 Hz TL = K (2 Trated 0.5 Trated Zsyn,r ((oo/o) Zr,r (slip,r = 1500 1460 = 40 rpm Zslip,r or4.19 rad/s a)Load torque is given by: T L = K (2 1460 rpm 152.9 rad/s 20 = K(152.9)2 8 K = 20/(152.9)2 TL = 20 (2 21 5 2 .9 4at 0.5 rated torque, the speed is 108.11 rad/s Motor T-( is obtained as follows: T r a t edT r a t edTe == 4 .7 7 = ( s lip( s yn , r( r , r( s yn( r Te = 4 . 7 7 ( s yn4 . 7 7 ( r Therefore at 0.5 Trated and speed of 108.11 rad/s 1 0 = 4 . 7 7 ( s yn4 . 7 7 (1 0 8 . 1 1 ) 4(syn = 110.2 f = 35 Hz TL(Nm) 5 0 Hz 1.1(Trated) Trated TL = K (2 Zsyn,r ((oo/o) Zslip = Zsyn 1 . 1 T r a t edT = r a t ed ( s lip4 .1 9 Zr,r Zslip,r At start-up,( s lip = ( s yn 4( s yn = 4 . 1 9 (1 . 1 ) = 4 . 6 1 9 SCALAR CONTROL OF IM We have seen that applying balanced, sinusoidal 3-phase supply to a 3-phase sinusoidally distributed winding produces a rotating mmf wave and hence rotating magnetic flux. The rotating magnetic flux will induce emf on the rotor circuit, which is shorted for squirell cage rotor. Rotor current will flow and interact with the rotating flux, producing torque. Rs + V Ls l + Eg Lr l Lm Im Rr/ s Per-phase steady state equivalent circuit To ensure maximum torque capability at all time it is therefore necessary to maintain the magnetic flux at its rated value at any frequency. From the steady state equivalent circuit, this is equivalent to maintaining the magnetizing current at its rated value. The flux can be maintained constant at its rated by maintaining the ratio Eg/f constant. At high speed, where the induced back emf is large, the drop across the stator leakage and resistance is negligibly small.- therefore Eg/f is maintained constant by maintaining V/f constant. However at low speed, the back emf is low and the drop is significant. Thus the flux is reduced below rated torque capability is also reduced. The performance can be improved by: (i)Boosting the voltage at low frequency: speed-rad/s torque - Nm Simulation results with constant V/f 10 To accurately boost the voltage, stator current needs to be measured. The voltage drop drop is calculated and added to stator voltage on-line ii)Control the stator current such that constant magnetising current is maintained. This is achieved by using a current-controlled voltage source inverter. Im = j( L lr + R j( (L lr + L m ) + r s j( (L lr + L m ) + j( L lr + Rr s Rr s I1 I1 = Rr s Im Introducing (r = rotor leakage factor, which gives, Llr = (rLm, I1 = j( L r + (r j( 1 + (r Rr s |R |L r + r | s. Im I1 = j( s lip Tr + 1 (r j( s lip 1 + (r | | Tr + 1 | . Im , Where Tr = Lr/Rr and (slip = ( - (r = s The method depends on the rotor parameters, which vary with temperature. Open-loop V/f control 11 For low cost, low performance drive, open-loop constant V/f control is normally employed. With open-loop speed control, the rotor speed will be less than the synchronous speed by slip speed. In other words, the desired speed, (-, will differ from the actual speed by slip speed. The slip speed on the other hand, depends on load. To improve the performance or the speed regulation, slip speed can be estimated and added to the reference speed slip compensation technique. Typical arrangement is shown below: 3-phase supply Rectifier VSI IM Ramp (* + + Slip speed calculator + + V Pulse Width Modulator Vboost Vdc Idc How is the slip speed estimated? The slip frequency is proportional to the torque, hence it can estimated by estimating the torque. The torque is estimated from, Te = Pag/syn 12 Pag is estimated by subtracting the input DC power with the inverter and stator copper losses. Closed-loop speed control Speed regulation can be improved by employing closed-loop speed control system with tachometer feedback, as shown below. The reference and actual speed are compared. The error is fed to the speed controller which defines the inverter frequency. The current limit is activated only when current exceeds the maximum allowable value. The signal generated by the current limit block will reduce the rate by which the inverter frequency is increased. This is to avoid the frequency from reaching the breakdown frequency. Further readings: Power Electronic Control of AC Motors J.M.D. Murphy and F.G. Turnbull, Pergamon Press 13 Modelling of 3-phase Induction Machine (IM) The steady state model of IM, which is represented by a steady state per phase equivalent circuit introduced in the undergraduate courses, describes the steady state behaviour of the IM. It is used when steady state analysis, such as efficiency, losses, steady state torque, current, fluxes need to be evaluated. The model assumes input to be a balanced, 3- phase steady state sinusoidal voltage. If the IM is fed by power electronic converters, the steady state analysis can be performed by representing the pulse-width modulated waveform of the inverter using Fourier series. Steady state model of IM is also used to derive the control signals used for scalar control drives. Since the model only valid in steady state condition, such drive normally has a poor transient performance. Applications not requiring good transient response such as fans, blowers or compressors, normally employ such control technique. Dynamic model on the other hand, describes the transient as well as the steady state behaviour of the IM. Using the dynamic model, the transients of IM, which cannot be analysed using steady state equivalent model, can be predicted and studied. The model can be used to simulate the IM drives and evaluate their transient performances, including that of using the scalar control technique. Dynamic model is also essential when developing high performance control techniques for IM drives, such as vector control or direct torque control drives. A dynamic model of IM must contain effect of the magnetic coupling between stator phase circuits and the rotor phase circuits, as well as coupling between phases of each circuit. This will undoubtedly result in a huge number and complex equations, which are difficult to manage. By using space vector equations, however, these complex equations are simplified and reduced. We will now develop a dynamic model of an IM using mathematical equations based on space vectors or space phasors (these terms will be defined later on). System equations Figure 1 shows the conceptual representation of a 3-phase, 2 poles induction machine. The magnetic axis of each winding is represented by an inductor symbol. As usual the angles between windings of each phase are 120o. The angle between rotors phase a axis and stators phase a axis is given by \r. The equation describing the stator and rotor circuits can be written as: vabcs = Rsiabcs + d(abcs)/dt. vabcr = Rriabcr + d(abr)/dt. where, (1) (2) v abcs v as = v bs v cs iabcs ias = ibs ics abcs = as bs cs and v abcr = v ar v br v cr iabcr iar = ibr icr abcs = ar br cr It is clear that since the displacements between various windings of all the phases are non-quadrature, there exists magnetic coupling between them. The stator and rotor flux linkages (abcs and .abcs)of equations (1) and (2) are contributed by the stator and rotor currents. Thus: abcs = abcs,s + abcs,r abcr = abcr,r + abcr,s (3) (4) 1 stator, b rotor, a rotor, b \rstator, a = 0 rotor, c Figure 1 stator, c .abcs,s and .abcs,r are the components of the stator flux linkage caused by stator and rotor currents (phase a, b and c) respectively, and, .abcr,r and .abcr,s are the components of the rotor flux linkage caused by rotor and stator currents (phase a, b and c) respectively These flux linkages can be written in terms of the inductances and respective currents. abcs,s Las Labs Lacs ias = Labs L bs L bcs ibs Lacs L bcs Lcs ics Las,arLas,br L bs,br Lcs,br Las,cr iar L bs,cr ibr Lcs,cr icr (5) abcs,r = L bs,ar Lcs,ar (6) Lar abcr,r = Labr Labr L br Lacr iar L bcr ibr Lcricr (7) Lacr L bcr 2 Lar,as abcr,s = Lcr,as Lar,bs Lcr,bs Lar,cs ias (8)L br,as L br,bs L br,cs i bs Lcr,cs ics In equation (5), Las, Lbs and Lcs are the self inductances of phases a, b and c respectively. The self inductance consists of magnetising and leakage inductance. Las = Lms + Lls.Lbs = Lms + Lls.Lcs = Lms + Lls. Labs, Lbcs, Lacs in equation (5), are the mutual inductances between stator phases. For symmetrical winding, which is normally the case, magnetising and leakage as well as mutual inductances for each phase are equal. It can be shown that the magnetizing and the mutual inductances are given by: 2L ms = o Ns rl g 4 2L abs = L bcs = L acs = o Ns rl g 8 =L ms 2 (9) Thus equation (5) can be written as: L ms + Lls abcs,s = L ms 2 L ms 2 L ms 2 L ms 2 L ms + Lls L ms 2 L ms 2 L ms + Lls ias ibs ics (10) The mutual inductances between the stator and rotor windings in (6) and (8) depend on the rotor position, \r and it can be shown that they can be written as: abcs,r N = r L ms Ns ( cos(\ cos \r cos \2 r r ) + 2 3) 3 cos \r + 2 3 cos \r cos \r2 3 ( ( ) ) ) ) cos \r2 3 cos \r + 2 3 cos \r ( ( ) ) iar ibr icr (11) abcr,s N = r L ms Ns ( cos(\ cos \r cos \ + 2 r r ) 2 3) 3 cos \r2 3 cos \r cos \r + 2 3 ( ( cos \r + 2 3 cos \r2 3 cos \r ( ( ) ) ias ibs ics (12) Space phasors representation of induction machine Equations (1)-(8) give the complete description of the electrical characteristics of an induction machine. There are six circuits that describe the 3-phase induction machine and each of them coupled to one another. Although the determinations of the inductances are quite straight forward, however, the number of equations involved is large. We will now develop a model of the induction machine which is based on space phasors or space vectors and valid under steady state and transient conditions. By doing so, the number of equations is significantly reduced. 3 If the permeability of the core is assumed infintely large, all the mmf drops will appear across the airgap. Therefore, the stator airgap MMF of a sinusoidally distributed winding for phase a can be written as: N as = s ias cos(()(13) 2 is any angle where =0 coincide with the magnetic axis of stator winding phase a. ( is the angle in which airgap mmf is maximum. ias is the stator phase a current. If ( = 0 then equation (9) can be written as: Ns ias cos (14) 2 Phases b and c are spatially separated from phase a by 120o. Thus airgap mmf of phase b and c are given by: as = bs = cs The total airgap mmf Ns2 i bs cos( ) 23 N2 = s ics cos( +) 23 (15) (16) abcs = NsNN22 )ias cos + s i bs cos( ) + s ics cos( + 22323 (17) Using Eulers identity and with some mathematical manupulation, it can be shown that: abcs = where a = ej(2/3) Ns ias + a2i bs + aics ej + ias + ai bs + a2ics ej 4 {()()} (18) This can be further reduced or written as: abcs = 3 Ns*isej + is ej 2 4 {} (19) The term is is defined as the space phasor or complex space vector of the stator current. It is given by: is = 2 ias + aibs + a2ics 3 () (20) The physical current can be obtained from the space phasor by separating the space phasor into its real and imaginary part. In most cases we can assume that ias + ibs + ics = 0. 2 is =(ias + ibs(cos 120 + j sin 120) + ics(cos 240 + j sin 240)) 3 = 213 ias(ibs + ics) + j(ibsics) 322 1 (ibsics) 3 = ias + j Thus ias = Re|is | (21) Similarly it can be shown that 4 =|| and=| | (22) Similar definitions can be made to the stator voltage, rotor current, stator flux and rotor flux. Equations (1) and (2) therefore can be written as: =+ (23) (24)vr = Rrir + dr dt is composed of components caused by stator and rotor currents as given by (3). In space phasors, (3) can be written as: = +(25) is obtained by multiplying second and third rows of (5) with a and a2 respectively. can be obtained from (6). With some mathematical manipulations, it can beSimilarly, shown that: 's = Ls is + L m irej\r(26) 'Where Ls = Lls + Lm , Lm = 3/2Lms and ir = Nr ir Ns Similarly, it can be shown that the rotor flux linkage can be written as: ''r = Lr ir + L m isej\r(27) 'ir ) , is the space vector referred to the Note that the rotor current in (26) (i.e. 'rotating rotor reference frame. However, the d and q components of ir ej\r are expressed in the stator stationary reference frame. This is illustrated in Figure 2. Therefore we can define the rotor current referred to the stator stationary frame as s'ir = ir ej\r(28) Equation (26) can be written in stationary stator reference frame as: ss = Ls iss + L m irs(29) Where the superscript s referred to the stator reference frame. qr 'ir = i' ejrr s(ir = i' ej r + \r)r qs 'ir isqr dr (r Figure 2 ds r \r isdr 5 Similarly the term isej\r in (27) is the stator current referred to rotating rotor frame. This is illustrated in Figure 3. qr qs is is = isejs (isr = isej s\r) dr irqs (r Figure 3 s \r irds ds Re-writing equations (23),(24),(26) and (27), the space vector equations to describe the squirrel cage IM written in stationary stator frame can be written as follows: sd.s + dt v s s = R i s r r s s s (30a) (31a) (32a) (33a) 0 = R i sd. rs+ j(r .r dt s.s = Ls iss + L m irs ss. r = Lr ir + L m iss In a general reference frame rotating at angular speed of (, these equations can be written as: v g s = R i g r r g s s gd.sg++ j(g .s dt (30b) (31b) (32b) (33b) 0 = R i gd. r ++ j (g(r ) r(.g dt g.s = Ls isg + L m irg g.r = Lr irg + L m isg Torque equation The product of the stator voltage and conjugate stator current space vectors is given by: *vs is = 22 v as + av bs + a2v csias + a2ibs + aics 33 () () (34) After some mathematical manipulations, with the three phase currents sum to zero, it can be shown that: Re vs is* =||2(v asias + v bsibs + v csics ) 3 (35) 6 For a three phase induction machine without a neutral return, the power into the machine can be written as: Pe = 3 Re vs is* 2 ( ||) + 3 (Re|v i |) 2 ' *' r r (36) Replacing the voltage vectors expressed in rotating general reference frame, it can be shown that equation (36) can be expressed as: ' 22 Llr ' 2333 Lls'2'2Pe =rs is + rr ir +pis +ir + L m is + ir 22222 23*'2+ Re j((Lls + L m )is + L m ir is + j ((r)(Lls + L m )ir(+ L misi'*r2 || (37) Equation (37) can be divided into three terms: (i) (ii) (iii) Power dissipated in stator and rotor resistances Time rate of change of stored energy Power conversion from electrical to mechanical responsible for torque production 23'2Re j((Lls + L m )is + L m ir is* + j ((r)(Lls + L m )ir + L misi'*(r2 Pmech = || (38) The first and third terms of (38) have only imaginary components. Thus, Pmech = 33*Re j((L m ir is + j ((r) misi'* =(LRe j((L m ir is* + L misi'*j(rL misi'*rrr22 { ||}{ ||} (39) Since the term L m ir is* + L misi'* has no imaginary part, the mechanical power reduces to:r Pmech =Which can also be written as: 3 Re j(rL misi'*r2 {} (40) Pmech = 3 Im (rL misi'*r2 OR {} (41) Pmech = 3 (rL m iqsi'idsi'drqr2 || (42) The mechanical power is the product of torque and speed, and the mechanical rotor speed is related to the rotor speed as (r = (p/2)rm , thus from (42) Te = 3 p L m iqsi'idsi'drqr2 2 || (43) 7 Simulation of induction machine (IM) with MATLAB/SIMULINK For the purpose of simulation and microprocessor implementation, the space vectors representation of the induction machine is converted to its equivalent d-q axis form. Transforming equations (30)(33) to their equivalent d-q axis forms in stationary reference frame (g = 0), and re-arranging them into matrix form, the following is obtained: v sd v sq v rd v rq = R s + sLs 0 sL m (rL m 0 R s + sLs (rL m sL m sL m 0 R r + sLr (rLr 0 sL m (rLr R r + sLr isd i sq ird irq (44) sin (44) represents the derivative be put into state space forms with variables. If the stator and rotor arranging (44) the IM equation can be operator d/dt. The space vectors equations can also the choice of flux linkages or currents as state currents are chosen as the state variables, re- written as: isd isq ird irq R sL r = L2m 1 Lr Ls (rL2m R sL m (r L m Ls (r L2misq R sLr ( r L m Ls R sL m R rL m (r L m L r R r Ls ( r L r Ls (r L m L r R rL m (r Lr Ls R r Ls isd i sq ird irq + L2m 1 Lr Ls Lr 0 Lm 0 0 Lr 0 Lm v sd v sq (45) Equations (43),(45) along with the mechanical torque equation, can be used to simulate the IM using SIMULINK. The SIMULINK blocks used to simulate the IM is shown in Figure 4. 1 1 Va 5 Vd q 2 Vb3to2 Mux Mux In1Out1 isd 2 isq Demux 3 ird 6 irq IM1 Demux 3 Vc 7 Vq -K- 1/J 1/s Integrator Sum 8 Te T load Constant -K- Gain2 4 speed -K- Gain1 -K- 1/J1 Figure 4 8 http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl Model { Name"constant_vhz" Version5.0 SaveDefaultBlockParams on SampleTimeColorsoff LibraryLinkDisplay"none" WideLinesoff ShowLineDimensionsoff ShowPortDataTypesoff ShowLoopsOnErroron IgnoreBidirectionalLines off ShowStorageClassoff ExecutionOrderoff RecordCoverageoff CovPath"/" CovSaveName"covdata" CovMetricSettings"dw" CovNameIncrementingoff CovHtmlReportingon covSaveCumulativeToWorkspaceVar on CovSaveSingleToWorkspaceVar on CovCumulativeVarName"covCumulativeData" CovCumulativeReportoff DataTypeOverride"UseLocalSettings" MinMaxOverflowLogging"UseLocalSettings" MinMaxOverflowArchiveMode "Overwrite" BlockNameDataTipoff BlockParametersDataTip off BlockDescriptionStringDataTip off ToolBaron StatusBaron BrowserShowLibraryLinks off BrowserLookUnderMasksoff Created"Tue Oct 01 11:07:25 2002" UpdateHistory"UpdateHistoryNever" ModifiedByFormat"%" ModifiedDateFormat"%" LastModifiedDate"Mon Sep 13 15:37:48 2004" ModelVersionFormat"1.%" ConfigurationManager"none" SimParamPage"Solver" LinearizationMsg"none" Profileoff ParamWorkspaceSource"MATLABWorkspace" AccelSystemTargetFile"accel.tlc" AccelTemplateMakefile"accel_default_tmf" AccelMakeCommand"make_rtw" TryForcingSFcnDFoff ExtModeMexFile"ext_comm" ExtModeBatchModeoff ExtModeTrigType"manual" ExtModeTrigMode"normal" ExtModeTrigPort"1" ExtModeTrigElement"any" ExtModeTrigDuration1000 ExtModeTrigHoldOff0 ExtModeTrigDelay0 ExtModeTrigDirection"rising" ExtModeTrigLevel0 ExtModeArchiveMode"off" ExtModeAutoIncOneShotoff ExtModeIncDirWhenArmoff ExtModeAddSuffixToVaroff ExtModeWriteAllDataToWs off ExtModeArmWhenConnecton http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (1 von 28) [17.05.2005 17:15:21] http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl ExtModeSkipDownloadWhenConnect off ExtModeLogAllon ExtModeAutoUpdateStatusClock on BufferReuseon RTWExpressionDepthLimit 5 SimulationMode"normal" Solver"ode5" SolverMode"Auto" StartTime"0.0" StopTime"1000" MaxOrder5 MaxStep"0.0001" MinStep"0.00001" MaxNumMinSteps"-1" InitialStep"0.00001" FixedStep"10e-6" RelTol"1e-3" AbsTol"auto" OutputOption"RefineOutputTimes" OutputTimes"[]" Refine"1" LoadExternalInputoff ExternalInput"[t, u]" LoadInitialStateoff InitialState"xInitial" SaveTimeoff TimeSaveName"t" SaveStateoff StateSaveName"xout" SaveOutputoff OutputSaveName"yout" SaveFinalStateoff FinalStateName"xFinal" SaveFormat"Array" Decimation"1" LimitDataPointsoff MaxDataPoints"10000000" SignalLoggingName"sigsOut" ConsistencyChecking"none" ArrayBoundsChecking"none" AlgebraicLoopMsg"warning" BlockPriorityViolationMsg "warning" MinStepSizeMsg"warning" InheritedTsInSrcMsg"warning" DiscreteInheritContinuousMsg "warning" MultiTaskRateTransMsg"error" SingleTaskRateTransMsg "none" CheckForMatrixSingularity "none" IntegerOverflowMsg"warning" Int32ToFloatConvMsg"warning" ParameterDowncastMsg"error" ParameterOverflowMsg"error" ParameterPrecisionLossMsg "warning" UnderSpecifiedDataTypeMsg "none" UnnecessaryDatatypeConvMsg "none" VectorMatrixConversionMsg "none" InvalidFcnCallConnMsg"error" SignalLabelMismatchMsg "none" UnconnectedInputMsg"warning" UnconnectedOutputMsg"warning" UnconnectedLineMsg"warning" SfunCompatibilityCheckMsg "none" RTWInlineParametersoff BlockReductionOptoff BooleanDataTypeoff http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (2 von 28) [17.05.2005 17:15:21] http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl ConditionallyExecuteInputs on ParameterPoolingon OptimizeBlockIOStorage on ZeroCrosson AssertionControl"UseLocalSettings" ProdHWDeviceType"Microprocessor" ProdHWWordLengths"8,16,32,32" RTWSystemTargetFile"grt.tlc" RTWTemplateMakefile"grt_default_tmf" RTWMakeCommand"make_rtw" RTWGenerateCodeOnlyoff RTWRetainRTWFileoff TLCProfileroff TLCDebugoff TLCCoverageoff TLCAssertionoff BlockDefaults { Orientation"right" ForegroundColor"black" BackgroundColor"white" DropShadowoff NamePlacement"normal" FontName"Helvetica" FontSize10 FontWeight"normal" FontAngle"normal" ShowNameon } BlockParameterDefaults { Block { BlockTypeConstant Value"1" VectorParams1Don ShowAdditionalParamoff OutDataTypeMode"Inherit from 'Constant value'" OutDataType"sfix(16)" ConRadixGroup"Use specified scaling" OutScaling"2^0" } Block { BlockTypeDemux Outputs"4" DisplayOption"none" BusSelectionModeoff } Block { BlockTypeElementaryMath Operator"sin" } Block { BlockTypeGain Gain"1" Multiplication"Element-wise(K.*u)" ShowAdditionalParamoff ParameterDataTypeMode"Same as input" ParameterDataType"sfix(16)" ParameterScalingMode"Best Precision: Matrix-wise" ParameterScaling"2^0" OutDataTypeMode"Same as input" OutDataType"sfix(16)" OutScaling"2^0" LockScaleoff RndMeth"Floor" SaturateOnIntegerOverflow on } http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (3 von 28) [17.05.2005 17:15:21] http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl Block { BlockTypeInport Port"1" PortDimensions"-1" SampleTime"-1" ShowAdditionalParamoff LatchInputoff DataType"auto" OutDataType"sfix(16)" OutScaling"2^0" SignalType"auto" SamplingMode"auto" Interpolateon } Block { BlockTypeIntegrator ExternalReset"none" InitialConditionSource "internal" InitialCondition"0" LimitOutputoff UpperSaturationLimit"inf" LowerSaturationLimit"-inf" ShowSaturationPortoff ShowStatePortoff AbsoluteTolerance"auto" ZeroCrosson } Block { BlockTypeMux Inputs"4" DisplayOption"none" } Block { BlockTypeOutport Port"1" OutputWhenDisabled"held" InitialOutput"[]" } Block { BlockTypeProduct Inputs"2" Multiplication"Element-wise(.*)" ShowAdditionalParamoff InputSameDTon OutDataTypeMode"Same as first input" OutDataType"sfix(16)" OutScaling"2^0" LockScaleoff RndMeth"Floor" SaturateOnIntegerOverflow on } Block { BlockTypeRateLimiter RisingSlewLimit"1" FallingSlewLimit"-1" LinearizeAsGainon } Block { BlockTypeScope Floatingoff ModelBasedoff TickLabels"OneTimeTick" ZoomMode"on" Grid"on" TimeRange"auto" http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (4 von 28) [17.05.2005 17:15:21] http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl YMin YMax SaveToWorkspace SaveName LimitDataPoints MaxDataPoints Decimation SampleInput SampleTime "-5" "5" off "ScopeData" on "5000" "1" off "0" } Block { BlockType"S-Function" FunctionName"system" PortCounts"[]" SFunctionModules"''" } Block { BlockTypeSubSystem ShowPortLabelson Permissions"ReadWrite" RTWSystemCode"Auto" RTWFcnNameOpts"Auto" RTWFileNameOpts"Auto" SimViewingDeviceoff DataTypeOverride"UseLocalSettings" MinMaxOverflowLogging"UseLocalSettings" } Block { BlockTypeSum IconShape"rectangular" Inputs"++" ShowAdditionalParamoff InputSameDTon OutDataTypeMode"Same as first input" OutDataType"sfix(16)" OutScaling"2^0" LockScaleoff RndMeth"Floor" SaturateOnIntegerOverflow on } Block { BlockTypeSwitch Criteria"u2 >= Threshold" Threshold"0" ShowAdditionalParamoff InputSameDTon OutDataTypeMode"Inherit via internal rule" RndMeth"Floor" SaturateOnIntegerOverflow on ZeroCrosson } } AnnotationDefaults { HorizontalAlignment VerticalAlignment ForegroundColor BackgroundColor DropShadow FontName FontSize FontWeight FontAngle } LineDefaults { FontName "center" "middle" "black" "white" off "Helvetica" 10 "normal" "normal" "Helvetica" http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (5 von 28) [17.05.2005 17:15:21] http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl FontSize FontWeight FontAngle 9 "normal" "normal" } System { Name"constant_vhz" Location[2, 82, 790, 584] Openon ModelBrowserVisibility off ModelBrowserWidth200 ScreenColor"white" PaperOrientation"landscape" PaperPositionMode"auto" PaperType"usletter" PaperUnits"inches" ZoomFactor"100" ReportName"simulink-default.rpt" Block { BlockTypeConstant Name"Constant" Position[35, 121, 75, 139] Value"50" } Block { BlockTypeSubSystem Name"Constant V/Hz" Ports[2, 3] Position[270, 88, 335, 172] TreatAsAtomicUnitoff MaskPromptString"Vm at rated frequency" MaskStyleString"edit" MaskTunableValueString "on" MaskEnableString"on" MaskVisibilityString"on" MaskToolTipString"on" MaskVariables"Vm=@1;" MaskIconFrameon MaskIconOpaqueon MaskIconRotate"none" MaskIconUnits"autoscale" MaskValueString"240" System { Name"Constant V/Hz" Location[2, 70, 798, 552] Openoff ModelBrowserVisibility off ModelBrowserWidth200 ScreenColor"white" PaperOrientation"landscape" PaperPositionMode"auto" PaperType"usletter" PaperUnits"inches" ZoomFactor"88" Block { BlockTypeInport Name"In1" Position[30, 93, 60, 107] } Block { BlockTypeInport Name"boost" Position[20, 403, 50, 417] Port"2" } Block { http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (6 von 28) [17.05.2005 17:15:21] http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl BlockType Name Position Value Constant "Constant1" [195, 371, 235, 389] "(2*pi)/3" } Block { BlockTypeSubSystem Name"Dot Product1" Ports[2, 1] Position[400, 307, 430, 343] TreatAsAtomicUnitoff MaskType"Dot Product" MaskDescription"Inner (dot) product.\ny=sum(u1.*u2)" MaskHelp"Computes the inner (dot) product of the inp" "uts: sum(u1.*u2). The inputs are vectors of the same length. Output is a sca" "lar." MaskInitialization"t=(0:.1:2*pi)';\nx=cos(t);\ny=sin(t);" MaskDisplay"plot(0,0,1,1,x*[0.025 0.07]+0.5,y*[0.025 0." "07]+0.5)" MaskIconFrameon MaskIconOpaqueon MaskIconRotate"none" MaskIconUnits"normalized" System { Name"Dot Product1" Location[33, 479, 253, 634] Openoff ModelBrowserVisibility off ModelBrowserWidth200 ScreenColor"white" PaperOrientation"landscape" PaperPositionMode"auto" PaperType"usletter" PaperUnits"inches" ZoomFactor"100" Block { BlockTypeInport Name"in_1" Position[15, 25, 35, 45] } Block { BlockTypeInport Name"in_2" Position[15, 90, 35, 110] Port"2" } Block { BlockTypeProduct Name"Product" Ports[2, 1] Position[65, 55, 90, 75] } Block { BlockTypeSum Name"Sum" Ports[1, 1] Position[125, 55, 145, 75] Inputs"+" } Block { BlockTypeOutport Name"out_1" Position[185, 55, 205, 75] InitialOutput"0" } http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (7 von 28) [17.05.2005 17:15:21] http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } } "Sum" 1 "out_1" 1 "Product" 1 "Sum" 1 "in_1" 1 "Product" 1 "in_2" 1 "Product" 2 } Block { BlockTypeSubSystem Name"Dot Product2" Ports[2, 1] Position[340, 72, 370, 108] TreatAsAtomicUnitoff MaskType"Dot Product" MaskDescription"Inner (dot) product.\ny=sum(u1.*u2)" MaskHelp"Computes the inner (dot) product of the inp" "uts: sum(u1.*u2). The inputs are vectors of the same length. Output is a sca" "lar." MaskInitialization"t=(0:.1:2*pi)';\nx=cos(t);\ny=sin(t);" MaskDisplay"plot(0,0,1,1,x*[0.025 0.07]+0.5,y*[0.025 0." "07]+0.5)" MaskIconFrameon MaskIconOpaqueon MaskIconRotate"none" MaskIconUnits"normalized" System { Name"Dot Product2" Location[33, 479, 253, 634] Openoff ModelBrowserVisibility off ModelBrowserWidth200 ScreenColor"white" PaperOrientation"landscape" PaperPositionMode"auto" PaperType"usletter" PaperUnits"inches" ZoomFactor"100" Block { BlockTypeInport Name"in_1" Position[15, 25, 35, 45] } Block { BlockTypeInport Name"in_2" Position[15, 90, 35, 110] http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (8 von 28) [17.05.2005 17:15:21] http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl Port } Block { BlockType Name Ports Position } Block { BlockType Name Ports Position Inputs } Block { BlockType Name Position InitialOutput } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } } "2" Product "Product" [2, 1] [65, 55, 90, 75] Sum "Sum" [1, 1] [125, 55, 145, 75] "+" Outport "out_1" [185, 55, 205, 75] "0" "in_2" 1 "Product" 2 "in_1" 1 "Product" 1 "Product" 1 "Sum" 1 "Sum" 1 "out_1" 1 } Block { BlockTypeSubSystem Name"Dot Product3" Ports[2, 1] Position[385, 467, 415, 503] TreatAsAtomicUnitoff MaskType"Dot Product" MaskDescription"Inner (dot) product.\ny=sum(u1.*u2)" MaskHelp"Computes the inner (dot) product of the inp" "uts: sum(u1.*u2). The inputs are vectors of the same length. Output is a sca" "lar." MaskInitialization"t=(0:.1:2*pi)';\nx=cos(t);\ny=sin(t);" MaskDisplay"plot(0,0,1,1,x*[0.025 0.07]+0.5,y*[0.025 0." "07]+0.5)" MaskIconFrameon MaskIconOpaqueon MaskIconRotate"none" MaskIconUnits"normalized" http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (9 von 28) [17.05.2005 17:15:21] http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl System { Name Location Open ModelBrowserVisibility ModelBrowserWidth ScreenColor PaperOrientation PaperPositionMode PaperType PaperUnits ZoomFactor Block { BlockType Name Position } Block { BlockType Name Position Port } Block { BlockType Name Ports Position } Block { BlockType Name Ports Position Inputs } Block { BlockType Name Position InitialOutput } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort "Dot Product3" [33, 479, 253, 634] off off 200 "white" "landscape" "auto" "usletter" "inches" "100" Inport "in_1" [15, 25, 35, 45] Inport "in_2" [15, 90, 35, 110] "2" Product "Product" [2, 1] [65, 55, 90, 75] Sum "Sum" [1, 1] [125, 55, 145, 75] "+" Outport "out_1" [185, 55, 205, 75] "0" "in_2" 1 "Product" 2 "in_1" 1 "Product" 1 "Product" 1 "Sum" 1 "Sum" 1 "out_1" 1 http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (10 von 28) [17.05.2005 17:15:21] http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl } } } Block { BlockType Name Ports Position } Block { BlockType Name Ports Position } Block { BlockType Name Ports Position } Block { BlockType Name Position Gain } Block { BlockType Name Position Gain } Block { BlockType Name Position Gain } Block { BlockType Name Position Gain } Block { BlockType Name Position Gain } Block { BlockType Name Position Gain } Block { BlockType Name Ports Position } Block { BlockType ElementaryMath "Elementary\nMath" [1, 1] [275, 85, 305, 115] ElementaryMath "Elementary\nMath1" [1, 1] [335, 320, 365, 350] ElementaryMath "Elementary\nMath2" [1, 1] [320, 480, 350, 510] Gain "Gain" [150, 85, 180, 115] "2*pi" Gain "Gain1" [150, 25, 180, 55] "Vm/50" Gain "Gain2" [170, 320, 200, 350] "2*pi" Gain "Gain3" [170, 235, 200, 265] "Vm/50" Gain "Gain4" [160, 480, 190, 510] "2*pi" Gain "Gain5" [160, 420, 190, 450] "Vm/50" Integrator "Integrator" [1, 1] [210, 85, 240, 115] Integrator http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (11 von 28) [17.05.2005 17:15:21] http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl Name Ports Position } Block { BlockType Name Ports Position } Block { BlockType Name Ports Position ShowName IconShape Inputs InputSameDT OutDataTypeMode } Block { BlockType Name Ports Position ShowName IconShape Inputs InputSameDT OutDataTypeMode } Block { BlockType Name Ports Position ShowName IconShape Inputs InputSameDT OutDataTypeMode } Block { BlockType Name Ports Position ShowName IconShape Inputs InputSameDT OutDataTypeMode } Block { BlockType Name Ports Position ShowName IconShape Inputs InputSameDT OutDataTypeMode } "Integrator1" [1, 1] [230, 320, 260, 350] Integrator "Integrator2" [1, 1] [220, 480, 250, 510] Sum "Sum" [2, 1] [285, 325, 305, 345] off "round" "|+-" off "Inherit via internal rule" Sum "Sum1" [2, 1] [285, 485, 305, 505] off "round" "++|" off "Inherit via internal rule" Sum "Sum2" [2, 1] [275, 240, 295, 260] off "round" "++|" off "Inherit via internal rule" Sum "Sum3" [2, 1] [245, 30, 265, 50] off "round" "++|" off "Inherit via internal rule" Sum "Sum4" [2, 1] [325, 425, 345, 445] off "round" "++|" off "Inherit via internal rule" http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (12 von 28) [17.05.2005 17:15:21] http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl Block { BlockType Name Position } Block { BlockType Name Position Port } Block { BlockType Name Position Port } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Outport "Out1" [395, 83, 425, 97] Outport "Out2" [455, 318, 485, 332] "2" Outport "Out3" [440, 478, 470, 492] "3" "Integrator" 1 "Elementary\nMath" 1 "Elementary\nMath" 1 "Dot Product2" 2 "Gain" 1 "Integrator" 1 "Elementary\nMath1" 1 "Dot Product1" 2 "Gain2" 1 "Integrator1" 1 "Elementary\nMath2" 1 "Dot Product3" 2 "Gain4" 1 "Integrator2" 1 "Sum" 1 "Elementary\nMath1" 1 http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (13 von 28) [17.05.2005 17:15:21] http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort Points Branch { Points DstBlock DstPort } Branch { Points DstBlock DstPort } } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort Points Branch { Points Branch { DstBlock DstPort } Branch { Points DstBlock DstPort } } Branch { Points Branch { Points Branch { Points DstBlock DstPort } Branch { DstBlock DstPort } } Branch { Points "Integrator1" 1 "Sum" 1 "Constant1" 1 [0, 0; 55, 0] [0, -20] "Sum" 2 [5, 0; 0, 90] "Sum1" 1 "Sum1" 1 "Elementary\nMath2" 1 "Integrator2" 1 "Sum1" 2 "In1" 1 [0, 0; 15, 0] [15, 0] "Gain" 1 [0, -60] "Gain1" 1 [0, 235] [35, 0] [0, -85] "Gain3" 1 "Gain2" 1 [0, 160; 25, 0] http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (14 von 28) [17.05.2005 17:15:21] http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl Branch { DstBlock DstPort } Branch { Points DstBlock DstPort } } } } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort "Gain4" 1 [0, -60] "Gain5" 1 "Dot Product2" 1 "Out1" 1 "Dot Product1" 1 "Out2" 1 "Dot Product3" 1 "Out3" 1 "Gain3" 1 "Sum2" 2 "Sum2" 1 [40, 0; 0, 65] "Dot Product1" 1 "Gain1" 1 "Sum3" 2 "Sum3" 1 [25, 0; 0, 40] "Dot Product2" 1 "Gain5" 1 "Sum4" 2 "Sum4" 1 http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (15 von 28) [17.05.2005 17:15:21] http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl Points DstBlock DstPort } Line { SrcBlock SrcPort Points Branch { DstBlock DstPort } Branch { Points Branch { Points DstBlock DstPort } Branch { Points DstBlock DstPort } } } } [10, 0; 0, 40] "Dot Product3" 1 "boost" 1 [70, 0] "Sum4" 1 [0, -220] [0, -175] "Sum3" 1 [160, 0] "Sum2" 1 } Block { BlockTypeConstant Name"Constant1" Position[60, 280, 90, 300] Value"50" } Block { BlockTypeConstant Name"Constant2" Position[60, 230, 90, 250] Value"0" } Block { BlockTypeGain Name"Gain" Position[335, 35, 365, 65] Gain"(2*pi)/2" } Block { BlockTypeSubSystem Name"Induction Machine" Ports[3, 8] Position[470, 63, 525, 192] TreatAsAtomicUnitoff MaskPromptString"Stator resistance (ohm)|Rotor resistance (ohm)|" "Stator self inductance (H)|Rotor self inductance (H)|Mutual Inductance (H)|No" " of poles|Moment of inertia (kg.m^2)|Load torque (Nm)|Load constant" MaskStyleString"edit,edit,edit,edit,edit,edit,edit,edit,edit" MaskTunableValueString "on,on,on,on,on,on,on,on,on" MaskCallbackString"||||||||" MaskEnableString"on,on,on,on,on,on,on,on,on" MaskVisibilityString"on,on,on,on,on,on,on,on,on" MaskToolTipString"on,on,on,on,on,on,on,on,on" MaskVarAliasString",,,,,,,," MaskVariables"Rs=@1;Rr=@2;Ls=@3;Lr=@4;Lm=@5;pole=@6;J=@7;Tloa" "d=@8;load_C=@9;" MaskIconFrameon http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (16 von 28) [17.05.2005 17:15:21] http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl MaskIconOpaque MaskIconRotate MaskIconUnits MaskValueString "|0.1" on "none" "autoscale" "5.5|4.51|306.5e-3|306.5e-3|291.9e-3|4|0.02|0.01" System { Name"Induction Machine" Location[2, 70, 798, 552] Openoff ModelBrowserVisibility off ModelBrowserWidth200 ScreenColor"white" PaperOrientation"landscape" PaperPositionMode"auto" PaperType"usletter" PaperUnits"inches" ZoomFactor"100" Block { BlockTypeInport Name"Va" Position[25, 40, 45, 60] } Block { BlockTypeInport Name"Vb" Position[25, 120, 45, 140] Port"2" } Block { BlockTypeInport Name"Vc" Position[25, 240, 45, 260] Port"3" } Block { BlockTypeGain Name"1/J" Position[260, 292, 285, 318] Orientation"left" Gain"pole/(2*J)" SaturateOnIntegerOverflow off } Block { BlockTypeSubSystem Name"3to2" Ports[3, 2] Position[105, 81, 135, 139] ShowPortLabelsoff TreatAsAtomicUnitoff System { Name"3to2" Location[4, 74, 628, 500] Openoff ModelBrowserVisibility off ModelBrowserWidth200 ScreenColor"white" PaperOrientation"landscape" PaperPositionMode"auto" PaperType"usletter" PaperUnits"inches" ZoomFactor"100" Block { BlockTypeInport Name"in_1" Position[15, 50, 35, 70] http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (17 von 28) [17.05.2005 17:15:21] http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl } Block { BlockType Name Position Port } Block { BlockType Name Position Port } Block { BlockType Name Position Gain } Block { BlockType Name Position Gain } Block { BlockType Name Position Gain } Block { BlockType Name Position Gain } Block { BlockType Name Position Gain } Block { BlockType Name Ports Position } Block { BlockType Name Ports Position Inputs } Block { BlockType Name Position InitialOutput } Block { BlockType Name Inport "in_2" [15, 115, 35, 135] "2" Inport "in_3" [15, 180, 35, 200] "3" Gain "Gain3" [120, 248, 160, 272] "0.577" Gain "Gain4" [120, 298, 160, 322] "-0.577" Gain "Gain5" [145, 143, 185, 167] "-0.33333" Gain "Gain6" [140, 183, 180, 207] "-0.33333" Gain "Gain7" [135, 63, 175, 87] "0.66666" Sum "Ib" [2, 1] [240, 255, 260, 275] Sum "Ib1" [3, 1] [260, 87, 280, 123] "+++" Outport "d" [330, 60, 350, 80] "0" Outport "q" http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (18 von 28) [17.05.2005 17:15:21] http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl Position Port InitialOutput } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort Points Branch { DstBlock DstPort } Branch { Points DstBlock DstPort } } Line { SrcBlock SrcPort Points Branch { DstBlock DstPort } Branch { Points DstBlock DstPort [310, 250, 330, 270] "2" "0" "Ib1" 1 [15, 0; 0, -35] "d" 1 "Gain7" 1 [30, 0; 0, 20] "Ib1" 1 "in_1" 1 [40, 0; 0, 15] "Gain7" 1 "Gain6" 1 [30, 0; 0, -90] "Ib1" 2 "Gain5" 1 [25, 0; 0, -40] "Ib1" 3 "in_3" 1 [40, 0; 0, 5] "Gain6" 1 [0, 115] "Gain4" 1 "in_2" 1 [20, 0; 0, 30] "Gain5" 1 [0, 105] "Gain3" 1 http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (19 von 28) [17.05.2005 17:15:21] http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl } } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } } } Block { BlockTypeConstant Name"Constant" Position[630, 306, 670, 324] Orientation"left" Value"Tload" } Block { BlockTypeDemux Name"Demux" Ports[1, 5] Position[420, 91, 460, 149] Outputs"5" } Block { BlockTypeGain Name"Gain1" Position[150, 407, 175, 433] Orientation"left" Gain"2/pole" } Block { BlockTypeSubSystem Name"IM1" Ports[1, 1] Position[320, 106, 380, 134] TreatAsAtomicUnitoff System { Name"IM1" Location[248, 340, 468, 422] Openoff ModelBrowserVisibility off ModelBrowserWidth200 ScreenColor"white" PaperOrientation"landscape" PaperPositionMode"auto" PaperType"usletter" PaperUnits"inches" ZoomFactor"100" Block { BlockTypeInport Name"In1" http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (20 von 28) [17.05.2005 17:15:21] "Gain3" 1 "Ib" 1 "Gain4" 1 [30, 0; 0, -40] "Ib" 2 "Ib" 1 "q" 1 http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl Position } Block { BlockType Name Ports Position FunctionName Parameters } Block { BlockType Name Position InitialOutput } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } } [25, 33, 55, 47] "S-Function" "S-Function" [1, 1] [80, 25, 140, 55] "imch" "Rs, Rr, Ls,Lr,Lm,pole" Outport "Out1" [165, 33, 195, 47] "0" "In1" 1 "S-Function" 1 "S-Function" 1 "Out1" 1 } Block { BlockTypeIntegrator Name"Integrator" Ports[1, 1] Position[360, 295, 380, 315] Orientation"left" } Block { BlockTypeMux Name"Mux" Ports[3, 1] Position[260, 104, 290, 136] Inputs"3" } Block { BlockTypeSum Name"Sum" Ports[3, 1] Position[440, 287, 460, 323] Orientation"left" Inputs"+--" } Block { BlockTypeGain Name"load_C" Position[375, 367, 400, 393] Gain"load_C" SaturateOnIntegerOverflow off } Block { BlockTypeOutport Name"isd" Position[630, 25, 650, 45] InitialOutput"0" } http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (21 von 28) [17.05.2005 17:15:21] http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl Block { BlockType Name Position Port InitialOutput } Block { BlockType Name Position Port InitialOutput } Block { BlockType Name Position Orientation Port InitialOutput } Block { BlockType Name Position Port InitialOutput } Block { BlockType Name Position Port InitialOutput } Block { BlockType Name Position Orientation Port InitialOutput } Block { BlockType Name Position Port InitialOutput } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } Outport "isq" [625, 70, 645, 90] "2" "0" Outport "ird" [600, 140, 620, 160] "3" "0" Outport "speed" [90, 410, 110, 430] "left" "4" "0" Outport "Vd" [265, 50, 285, 70] "5" "0" Outport "irq" [595, 185, 615, 205] "6" "0" Outport "Vq" [90, 285, 110, 305] "left" "7" "0" Outport "Te" [715, 230, 735, 250] "8" "0" "Demux" 1 [60, 0; 0, -20] "isq" 1 "Demux" 2 [65, 0; 0, -75] "isd" 1 http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (22 von 28) [17.05.2005 17:15:21] http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl Line { SrcBlock SrcPort Points Branch { Points DstBlock DstPort } Branch { Points DstBlock DstPort } } Line { SrcBlock SrcPort Points Branch { Points DstBlock DstPort } Branch { Points DstBlock DstPort } } Line { SrcBlock SrcPort Points Branch { Points DstBlock DstPort } Branch { Points DstBlock DstPort } } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort "3to2" 2 [0, 0] [0, 170] "Vq" 1 [55, 0; 0, -15] "Mux" 1 "3to2" 1 [0, 0; 25, 0] [0, -35] "Vd" 1 [30, 0; 0, 25] "Mux" 2 "Demux" 5 [45, 0; 0, 145] [0, 15; -35, 0] "Sum" 1 [70, 0; 0, -45] "Te" 1 "Vc" 1 [20, 0; 0, -120] "3to2" 3 "Vb" 1 [20, 0; 0, -20] "3to2" 2 "Va" 1 [20, 0; 0, 40] "3to2" 1 http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (23 von 28) [17.05.2005 17:15:21] http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl } Line { SrcBlock SrcPort Points Branch { Points DstBlock DstPort } Branch { Points Branch { Points DstBlock DstPort } Branch { DstBlock DstPort } } } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort Points "1/J" 1 [0, 0; -25, 0] [0, -175] "Mux" 3 [-15, 0; 0, 75] [0, 40] "Gain1" 1 "load_C" 1 "Mux" 1 "IM1" 1 "IM1" 1 "Demux" 1 "Sum" 1 "Integrator" 1 "Integrator" 1 "1/J" 1 "Demux" 3 [30, 0; 0, 75] "irq" 1 "Demux" 4 [25, 0; 0, 20] "ird" 1 "Gain1" 1 [0, 0] http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (24 von 28) [17.05.2005 17:15:21] http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Annotation { Name Position VerticalAlignment } } } Block { BlockType Name Ports Position SourceBlock SourceType sw action } Block { BlockType Name Ports Position ShowName Inputs DisplayOption } Block { BlockType Name Position RisingSlewLimit FallingSlewLimit } Block { BlockType Name Ports Position Location Open NumInputPorts List { ListType axes1 axes2 axes3 } List { ListType "speed" 1 "load_C" 1 [145, 0; 0, -75] "Sum" 2 "Constant" 1 "Sum" 3 "q" [482, 87] "top" Reference "Manual Switch" [2, 1] [150, 232, 180, 268] "simulink/Signal\nRouting/Manual Switch" "Manual Switch" "0" "0" Mux "Mux" [2, 1] [660, 41, 665, 79] off "2" "bar" RateLimiter "Rate Limiter" [170, 115, 200, 145] "50" "-50" Scope "Scope" [3] [735, 104, 765, 136] [357, 69, 795, 439] on "3" AxesTitles "%" "%" "%" SelectedSignals http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (25 von 28) [17.05.2005 17:15:21] http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl axes1 axes2 axes3 } TimeRange YMin YMax DataFormat } Block { BlockType Name Ports Position Location Open NumInputPorts List { ListType axes1 axes2 axes3 axes4 } List { ListType axes1 axes2 axes3 axes4 } TimeRange YMin YMax SaveName DataFormat } Block { BlockType Name Ports Position SourceBlock SourceType low gain high } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort "" "" "" "1.5" "-10~-20~-50" "80~20~50" "StructureWithTime" Scope "Scope1" [4] [455, 271, 490, 364] [6, 204, 444, 564] on "4" AxesTitles "%" "%" "%" "%" SelectedSignals "" "" "" "" "1.5" "-400~-400~-400~-5" "400~400~400~60" "ScopeData1" "StructureWithTime" Reference "Slider\nGain1" [1, 1] [100, 115, 130, 145] "simulink/Math\nOperations/Slider\nGain" "Slider Gain" "0" "0.07" "1" "Induction Machine" 8 [55, 0; 0, -60] "Scope" 2 "Induction Machine" 2 [190, 0] "Scope" 3 "Slider\nGain1" 1 http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (26 von 28) [17.05.2005 17:15:21] http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort Points Branch { DstBlock DstPort } Branch { Points DstBlock DstPort } } Line { SrcBlock SrcPort Points Branch { DstBlock DstPort } Branch { Points DstBlock DstPort } } Line { SrcBlock SrcPort Points Branch { Points DstBlock DstPort } Branch { Points DstBlock DstPort } } Line { SrcBlock SrcPort Points Branch { Points DstBlock DstPort } Branch { Points Branch { Points "Rate Limiter" 1 "Constant" 1 "Slider\nGain1" 1 "Constant V/Hz" 2 [0, 0; 70, 0] "Induction Machine" 2 [0, 175] "Scope1" 2 "Constant V/Hz" 1 [55, 0; 0, -20; 35, 0] "Induction Machine" 1 [0, 195] "Scope1" 1 "Constant V/Hz" 3 [0, 0; 40, 0] [15, 0; 0, 20] "Induction Machine" 3 [0, 175] "Scope1" 3 "Rate Limiter" 1 [0, 0; 10, 0] [0, 225] "Scope1" 4 [25, 0] [15, 0] http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (27 von 28) [17.05.2005 17:15:21] http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl DstBlock DstPort } Branch { Points DstBlock DstPort } } } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } } } "Constant V/Hz" 1 [0, -80] "Gain" 1 "Constant1" 1 [0, -30] "Manual Switch" 2 "Constant2" 1 "Manual Switch" 1 "Manual Switch" 1 [70, 0] "Constant V/Hz" 2 "Mux" 1 [50, 0] "Scope" 1 "Induction Machine" 4 [115, 0] "Mux" 2 "Gain" 1 "Mux" 1 http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (28 von 28) [17.05.2005 17:15:21] http://encon.fke.utm.my/courses/mep1422/imch.c /* * sfuntmpl.c: Template C S-function source file. * * ------------------------------------------------------------------------- * | See matlabroot/simulink/src/sfuntmpl.doc for a more detailed template | * ------------------------------------------------------------------------- * * Copyright (c) 1990-97, by The MathWorks, Inc. * All Rights Reserved * $Revision 1.1 $ */ /* * You must specify the S_FUNCTION_NAME as the name of your S-function. */ #define S_FUNCTION_NAME imch /* Input Arguments */ /* * Need to include simstruc.h for the definition of the SimStruct and * its associated macro definitions. */ /* #include "tmwtypes.h" */ #include "tmwtypes.h" #include "simstruc.h" #define #define #define #define #define #define Rs ssGetArg(S,0) Rr ssGetArg(S,1) Ls ssGetArg(S,2) Lr ssGetArg(S,3) Lm ssGetArg(S,4) pole ssGetArg(S,5) /*====================* * S-function methods * *====================*/ /* Function: mdlInitializeSizes =============================================== * Abstract: * * The sizes information is used by SIMULINK to determine the S-function * block's characteristics (number of inputs, outputs, states, etc.). * */ static void mdlInitializeSizes(SimStruct *S) { ssSetNumContStates(S, 4);/* number of continuous states*/ ssSetNumDiscStates(S, 0);/* number of discrete states*/ ssSetNumInputs(S, 3);/* number of inputs*/ ssSetNumOutputs(S, 5);/* number of outputs*/ ssSetDirectFeedThrough(S, 0);/* direct feedthrough flag*/ ssSetNumSampleTimes(S, 1);/* number of sample times*/ ssSetNumInputArgs(S, 6); ssSetNumRWork(S, 0);/* number of real work vector elements*/ ssSetNumIWork(S, 0);/* number of integer work vector elements*/ ssSetNumPWork(S, 0);/* number of pointer work vector elements*/ ssSetNumModes(S, 0);/* number of mode work vector elements*/ ssSetNumNonsampledZCs( S, 0);/* number of nonsampled zero crossings*/ ssSetOptions(S, 0);/* general options (SS_OPTION_xx)*/ } http://encon.fke.utm.my/courses/mep1422/imch.c (1 von 3) [17.05.2005 17:15:22] http://encon.fke.utm.my/courses/mep1422/imch.c /* Function: mdlInitializeSampleTimes ========================================= */ static void mdlInitializeSampleTimes(SimStruct *S) { ssSetSampleTime(S, 0, CONTINUOUS_SAMPLE_TIME); ssSetOffsetTime(S, 0, 0.0); } /* Function: mdlInitializeConditions ========================================== * Abstract: * * In this function, you should initialize the continuous and discrete * states for your S-function block. The initial states are placed * in the x0 variable. You can also perform any other initialization * activities that your S-function may require. */ static void mdlInitializeConditions(real_T *x0, SimStruct *S) { int i; for (i=0; i1"< 1"< 4 %, @ ? 1 # ? E B >: ?F 4 E &225 AB G E" > 3/ &220 AB * /[r,theta]" MaskDescription"Tranformation from cartesian to polar\ncoor" "dinates.\nr=sqrt(x^2+y^2), theta=atan(y/x)" MaskHelp"Unmask this block for more help." MaskDisplay"plot(0,0,100,100,[24,20,15,20,20],[85,95,85" ",95,20],[80,20,95,85,95,85],[70,20,20,15,20,24],[56,56,55,52,50,46],[20,26,31" ",35,38,42])" MaskIconFrameon MaskIconOpaqueon MaskIconRotate"none" MaskIconUnits"autoscale" System { Name"Cartesian to Polar" Location[0, 0, 359, 206] Openoff ModelBrowserVisibility off ModelBrowserWidth200 ScreenColor"white" PaperOrientation"landscape" PaperPositionMode"auto" PaperType"usletter" PaperUnits"inches" ZoomFactor"100" Block { BlockTypeInport Name"x" Position[20, 70, 40, 90] } Block { BlockTypeInport Name"y" Position[20, 129, 40, 151] Port"2" } Block { BlockTypeMux Name"Mux" Ports[2, 1] Position[75, 96, 105, 129] Inputs"2" } Block { BlockTypeFcn Name"x->r" Position[155, 72, 260, 98] Expr"hypot(u[1],u[2])" } Block { BlockTypeFcn Name"x->theta" Position[160, 129, 265, 151] Expr"atan2(u[2],u[1])" } http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (21 von 29) [17.05.2005 17:16:37] http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl Block { BlockType Name Position InitialOutput } Block { BlockType Name Position Port InitialOutput } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort Points Branch { Points DstBlock DstPort } Branch { Points DstBlock DstPort } } Annotation { Name Position VerticalAlignment } } } Block { BlockType Name Position Gain } Outport "r" [295, 75, 315, 95] "0" Outport "theta" [295, 130, 315, 150] "2" "0" "x->theta" 1 "theta" 1 "y" 1 "Mux" 2 "x" 1 "Mux" 1 "x->r" 1 "r" 1 "Mux" 1 [15, 0] [0, 25] "x->theta" 1 [0, -30] "x->r" 1 "Cartesian to Polar" [167, 37] "top" Gain "Gain2" [170, 167, 195, 193] "Rs" http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (22 von 29) [17.05.2005 17:16:37] http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl Block { BlockType Name Position Gain } Block { BlockType Name Ports Position } Block { BlockType Name Ports Position } Block { BlockType Name Ports Position Inputs } Block { BlockType Name Ports Position Inputs } Block { BlockType Name Position } Block { BlockType Name Position Port InitialOutput } Block { BlockType Name Position Port InitialOutput } Block { BlockType Name Position Port } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock Gain "Gain3" [170, 112, 195, 138] "Rs" Integrator "Integrator" [1, 1] [315, 85, 345, 115] Integrator "Integrator1" [1, 1] [310, 165, 340, 195] Sum "Sum6" [2, 1] [240, 90, 260, 110] "+-" Sum "Sum7" [2, 1] [240, 145, 260, 165] "+-" Outport "flxsdv" [500, 28, 530, 42] Outport "flxsv" [550, 88, 580, 102] "2" "0" Outport "angflxsv" [480, 123, 510, 137] "3" "0" Outport "flxsqv" [435, 203, 465, 217] "4" "Sum6" 1 "Integrator" 1 "Sum7" http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (23 von 29) [17.05.2005 17:16:37] http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl SrcPort DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort Points Branch { DstBlock DstPort } Branch { Points DstBlock DstPort } } Line { SrcBlock SrcPort Points Branch { Points DstBlock DstPort } Branch { Points DstBlock DstPort } } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort Points 1 "Integrator1" 1 "Gain3" 1 [25, 0] "Sum6" 2 "Gain2" 1 [0, -10] "Sum7" 2 "vd" 1 [60, 0; 0, 55] "Sum6" 1 "Integrator" 1 [0, 5; 25, 0] "Cartesian to Polar" 1 [0, -70] "flxsdv" 1 "Integrator1" 1 [50, 0] [0, -50] "Cartesian to Polar" 2 [0, 30] "flxsqv" 1 "Cartesian to Polar" 1 [75, 0] "flxsv" 1 "id" 1 [0, 20] http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (24 von 29) [17.05.2005 17:16:37] http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } } "Gain3" 1 "Cartesian to Polar" 2 "angflxsv" 1 "vq" 1 "Sum7" 1 "iq" 1 [0, -20] "Gain2" 1 } Block { BlockTypeSubSystem Name"torquehys" Ports[1, 1] Position[365, 300, 395, 350] Orientation"left" ShowPortLabelsoff TreatAsAtomicUnitoff MaskPromptString"Hyst band" MaskStyleString"edit" MaskTunableValueString "on" MaskEnableString"on" MaskVisibilityString"on" MaskToolTipString"on" MaskVariables"Th=@1;" MaskIconFrameon MaskIconOpaqueon MaskIconRotate"none" MaskIconUnits"autoscale" MaskValueString"2" System { Name"torquehys" Location[50, 122, 340, 345] Openoff ModelBrowserVisibility off ModelBrowserWidth200 ScreenColor"white" PaperOrientation"landscape" PaperPositionMode"auto" PaperType"usletter" PaperUnits"inches" ZoomFactor"100" Block { BlockTypeInport Name"in_1" Position[275, 95, 295, 115] Orientation"left" } Block { BlockTypeRelay Name"Relay" http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (25 von 29) [17.05.2005 17:16:37] http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl Position Orientation OnSwitchValue OffSwitchValue } Block { BlockType Name Position Orientation OnSwitchValue OffSwitchValue OnOutputValue OffOutputValue } Block { BlockType Name Ports Position Orientation } Block { BlockType Name Position Orientation InitialOutput } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort Points Branch { Points DstBlock DstPort } Branch { Points DstBlock DstPort } } } [185, 58, 215, 82] "left" "Th/2" "0" Relay "Relay1" [185, 123, 215, 147] "left" "0" "-Th/2" "0" "-1" Sum "Sum3" [2, 1] [55, 105, 75, 125] "left" Outport "out_1" [15, 105, 35, 125] "left" "0" "Sum3" 1 "out_1" 1 "Relay1" 1 [-75, 0] "Sum3" 2 "Relay" 1 [-65, 0] "Sum3" 1 "in_1" 1 [-20, 0] [0, 30] "Relay1" 1 [-5, 0] "Relay" 1 http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (26 von 29) [17.05.2005 17:16:37] http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort Points Branch { Points Branch { Points DstBlock DstPort } Branch { Points DstBlock DstPort } } Branch { DstBlock DstPort } } Line { SrcBlock SrcPort Points Branch { Points Branch { "Induction Machine" 5 [30, 0; 0, -100] "stator flux - voltage model" 1 "Induction Machine" 1 [110, 0] "stator flux - voltage model" 2 "Induction Machine" 2 [70, 0; 0, 35] "stator flux - voltage model" 4 "Induction Machine" 7 [15, 0; 0, -70] "stator flux - voltage model" 3 "stator flux - voltage model" 3 [40, 0; 0, 270] "S-Function2" 1 "Induction Machine" 8 [20, 0; 0, 20] [0, 90; 140, 0] [165, 0] "Sum2" 1 [0, -60] "Scope" 2 "Scope2" 1 "stator flux - voltage model" 2 [65, 0; 0, 95] [0, 60] http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (27 von 29) [17.05.2005 17:16:37] http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl Points DstBlock DstPort } Branch { DstBlock DstPort } } Branch { DstBlock DstPort } } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort [0, 165] "Sum4" 1 "Scope" 1 "Scope1" 1 "Voltage-controlled\nPWM-VSI1" 1 [20, 0; 0, -25] "Induction Machine" 1 "Voltage-controlled\nPWM-VSI1" 2 "Induction Machine" 2 "Voltage-controlled\nPWM-VSI1" 3 [20, 0; 0, 25] "Induction Machine" 3 "Subsystem" 1 [-80, 0; 0, -195] "Voltage-controlled\nPWM-VSI1" 1 "Subsystem" 2 [-70, 0; 0, -205] "Voltage-controlled\nPWM-VSI1" 2 "Subsystem" 3 [-60, 0; 0, -215] "Voltage-controlled\nPWM-VSI1" 3 "flux\nhysterisis" 1 [-40, 0; 0, -55] "Subsystem" 2 "Sum4" 1 http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (28 von 29) [17.05.2005 17:16:37] http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort DstBlock DstPort } Line { SrcBlock SrcPort Points DstBlock DstPort } } } "flux\nhysterisis" 1 "Step" 1 "Sum4" 2 "torquehys" 1 [-60, 0; 0, -20] "Subsystem" 1 "Sum2" 1 "torquehys" 1 "Signal\nGenerator" 1 "Sum2" 2 "S-Function2" 1 "Subsystem" 3 "Induction Machine" 4 [45, 0; 0, 120] "Scope" 3 http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (29 von 29) [17.05.2005 17:16:37]