Design and Implementation of a Three-Phase Induction Motor Control Scheme

93 693 1
Design and Implementation of a Three-Phase Induction Motor Control Scheme

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Design and Implementation of a Three-Phase Induction Motor Control Scheme By Gareth Stephen Roberts Department of Information Technology and Electrical Engineering, the University of Queensland Submitted for the degree of Bachelor of Electrical Engineering (Honours) October 2001 2001 Thesis Project Gareth S Roberts 34 Tolaga Street, Westlake, QLD, 4074 October 17, 2001 The Head of School, School of Information Technology and Electrical Engineering, University of Queensland, St Lucia, Qld, 4072 Dear Professor Simon Kaplan, In accordance with the requirements of the degree of Bachelor of Engineering (Honours) in the division of Electrical Engineering, I present the following thesis entitled “Design and Implementation of a Three-Phase Induction Motor Control Scheme” This thesis was carried out under the supervision of Dr Geoff Walker This thesis project has not been submitted at any other University I declare that this work has not been published or written by any other person, except where reference is made by text Yours sincerely, Gareth Roberts 2001 Thesis Project A2 Gareth S Roberts Abstract The use of a combustion engine to motivate a car has been questioned in recent times due to the increasing concern of “global warming” As a result of this, the concept of driving a car with an electric engine has become of particular interest Dr Geoff Walker and his PhD students are working on the creation of the University’s own electric car This thesis project is focused on deriving a control scheme to drive an induction machine that could be applied to the electric car Induction machines are universally used in industry because of their robustness, reliability, low price and high efficiency (up to 80%) However, until recent times, it has been hard to control the torque of the induction motor By using the “TMS320F243 DSP controller,” which is embedded in an existing hardware design and a control scheme called “Field Orientated Control,” we can control the torque of an induction machine with a high degree of accuracy Hence, this thesis project demonstrates how to apply Field Orientated Control with a DSP controller To this, extensive MATLAB analysis was conducted in order to optimize the control system The complete physical system is expected to be working on the demonstration day 2001 Thesis Project A3 Gareth S Roberts Acknowledgements I wish to thank the following people: Dr Geoff Walker, my supervisor, for taking the time through the whole course of the year for offering clear and enthusiastic explanations Dr Walker was always able to guide the thesis along the right path Mr David Finn for lending me his motor controller board David also provided the required information needed to operate this board My family, for offering support through my University years; this year in particular My fellow occupants in the Power Electronics labs, for putting up with my company for days on end To Andrew Gray and Jeffrey Jordan, thank you for the advise you offered through the course of the year 2001 Thesis Project A4 Gareth S Roberts Table of Contents Abstract………………………………………………………… i Acknowledgements……………………………………………… ii List of Figures and Illustrations………………………………… iii Chapter – Need/Basis for the thesis project………………… 1.1 Project Specification………………………………… 1.2 Available resources………………………………… 1.3 What are hyper and electric cars?…………………… 1.4 Why we use an Induction motor?………………… Chapter – Literature Review………………………………… 2.1 The Hybrid concept………………………………… 2.2 Induction Motor Theory and Practice………………… 2.3 Power Electronics…………………………………… 2.4 Field-Orientated Control……………………………… 2.5 MATLAB analysis…………………………………… Chapter – The Hardware Design……………………………… 3.1 The basic control format…………………………… 9 3.2 The existing motor controller……………………… 10 3.3 Current sensing module……………………………… 11 3.4 The speed sensor…………………………………… 12 2001 Thesis Project A5 Gareth S Roberts Chapter – The Induction Motor……………………………… 4.1 14 The fundamental operating principles for an Induction Motor…………………………………… 14 4.2 The Electrical principles of an Induction Motor…… 14 4.3 Torque/Speed generation for an Induction Motor…… 16 Chapter – Field-Orientated Control (FOC)…………………… 19 5.1 An introduction…………………………………… 19 5.2 Transformation between reference frames………… 20 5.3 The PI controller…………………………………… 21 5.4 PWM – Pulse-Width Modulation………………… 22 5.5 The Overall Design………………………………… 24 5.6 Conclusions drawn from Chapter 5………………… 26 Chapter – The MATLAB design…………………………… 6.1 MATLAB – An introduction……………………… 6.2 27 27 27 6.2.1 Field Orientated Control using SIMULINK……… 28 6.2.2 The Current Controller……………………………… 32 6.2.3 The Motor Model…………………………………… 32 Simulation of the MATLAB design……………… 34 6.3.1 Speed response analysis…………………………… 6.3 MATLAB simulation design……………………… 34 6.3.2 Analysis of the Field-Orientated Section of the Design……………………………………………… 6.3.3 The significance of feedback……………………… 6.4 38 41 The conclusions drawn from Chapter 6…………… 42 2001 Thesis Project A6 Gareth S Roberts Chapter – The Software Design……………………………… 7.1 A basic overview of how the software is organized…………………………………………… 7.2 43 43 The Main Program – The Field-Orientated Control Portion of the Software Design…………………… 44 7.2.1 The torque controller & Field Weakening………… 45 7.2.2 Calculation of iqs, ids, cos(rho) and sin(rho)……… 48 7.2.3 The Current Controller section of the software design 50 7.3 The PWM Interrupt Service Routine……………… 51 7.4 The Encoder Interrupt Service Rountine………… 55 7.5 A/D conversion…………………………………… 57 7.6 Concluding remarks……………………………… 58 Chapter – Final Project Performance and Evaluation…… 59 8.1 PWM test program……………………………… 59 8.2 Encoder test program #1………………………… 61 8.3 Encoder test program #2………………………… 62 Chapter – Conclusion………………………………………… 64 9.1 Summary and Conclusion………………………… 64 9.2 Future work………………………………………… 64 Bibliography……………………………………………………… 66 APPENDIX A – The proposed software design APPENDIX B – PWM test program 2001 Thesis Project A7 Gareth S Roberts APPENDIX C – Encoder detection test program #1 APPENDIX D – Encoder detection test program #2 APPENDIX E – The schematics for the Motor Controller board 2001 Thesis Project A8 Gareth S Roberts List of Figures Figure 1.1 – The Honda Insight Figure 1.2 – The parallel hybrid car Figure 3.1 – The basic physical design Figure 3.2 – The existing motor controller board Figure 3.3 – The current sensing module Figure 4.1 – The per phase representation of an Induction motor in steady state Figure 4.2 – The torque/speed curve Figure 4.3 – Field weakening Figure 5.1 – The transformation of the stationary reference frame to the rotating reference frame Figure 5.2 – The PI controller Figure 5.3 – Leg A of the full-bridge inverter Figure 5.4 – PWM VSI schematic and waveforms Figure 5.5 – The complete FO controller design in a block representation Figure 6.1 – The Look-up Table Figure 6.2 – The complete SIMULINK design Figure 6.3 – The FO_controller block Figure 6.4 – The dqe2abc block Figure 6.5 – The Inverse_Park_Transform Block Figure 6.6 – The Inverse_Clarke_Transform Block Figure 6.7 – The Current_controller block Figure 6.8 – The Induction machine in stationary qd0 Figure 6.9 – The MATLAB speed simulation results Figure 6.10 – The speed response of the control system where the proportional gain is increased Figure 6.11 – The speed response of the system with a proportional gain of 90 Figure 6.12 – cos(rho) and sin(rho) signals Figure 6.13 – The ids and iqs signal curves over time Figure 6.14 – The applied signal to phase A of the Induction motor and the drawn current on phase A Figure 6.15 – The speed response of the system without feedback Figure 7.1 – The flow chart for this thesis project Figure 7.2 – The torque controller Figure 7.3 – Graphical representation of the trapezoidal rule Figure 7.4 – Limiting the integration result Figure 7.5 – Calculation of the required rotor flux: Lambdare_r Figure 7.6 – The results of using the field-orientated technique Figure 7.7 – Overflow prevention of the slip-angle 2001 Thesis Project A9 Gareth S Roberts Figure 7.8 – Demonstration of the development of the slip angle over time Figure 7.9 – Flow-chart demonstrating how the current controller section works Figure 7.10 – PWM waveforms with dead-band Figure 7.11 – The PWM infrastructure Figure 7.12 – The Peripheral Interrupt Expansion Block Diagram Figure 7.13 – The encoder detection infrastructure Figure 7.14 – The flow-chart for Encoder detection Figure 8.1 – Experimentally measured PWM waveforms on the CRO 2001 Thesis Project A10 Gareth S Roberts APPENDIX A – The proposed software design /******************************************************************/ /* Title : */ /* Project : */ The proposed software design Induction motor controller /* Version : #1 */ /* Date : 22/08/2001 */ /* Author : Gareth S Roberts */ /* Company : UQ */ /* Comments: This is not the final design that is going to */ /* be used on the demonstration day Utilisation */ /* of A/D conversion and SCI has not been accounted*/ /* for in this program The final program will */ /* */ /* Chip type: TMS240F243 */ /* Clock frequency: 20 MHz */ /* */ /* */ /******************************************************************/ /******************************************************************/ /* Initialisation section of the design */ /******************************************************************/ #include "F24x.h" #define PERIOD 500 /* for 20kHz PWM */ /* Expression: 30, this gain term is the proportional gain used for */ /* the PI controller */ double Gain_Kp; /* Expression: 5, this is the integral gain for the PI controller */ double Gain_Ki; /* Expression: 3.125, this gain term is the proportional gain used */ /* for the PI controller */ double Gain_Kvp; /* Expression: 10000, this is the clock rate /amount of pulses */ /* detected per revolution by the encoder, 2000 in this case */ double Gain_Ks; /* used to convert the values read from the A/D converter double Gain_Kc; */ /* Expression: G1 = (4*xr)/(3P*xm) = 0.0.05817 */ double Gain_G1; /* Expression: G2= 2/P = */ 2001 Thesis Project Gareth S Roberts double Gain_G2; /* Expression: G3 = 1/xm = 6.711 */ double Gain_G3; /* Expression: G4 = xr/(rr*xm) = 0.0163 */ double Gain_G4; /* Expression: G5 = xm*rr/(lamdare_est*xr) = 177.72 */ double Gain_G5; /* Expression: G6 is used in the Clarke transform, double Gain_G6; = 2/3 */ /* Expression: G7 is used in the Clarke transform, double Gain_G7; = 1/3 */ /* Expression: G8 is used in the Clarke transform, double Gain_G8; = 1/sqrt(3) */ /* Expression: */ double Integrator1; /* Expression: */ double Integrator2; /* Expression: */ double IntegratorA; /* Expression: */ double IntegratorB; /* Expression: */ double IntegratorC; /* Expression: 20 */ double Integrator1_US; /* Expression: 360 */ double Integrator2_US; /* Expression: */ double IntegratorI_US; /* Expression: */ double Integrator_LS; /* Expression: 10e-5, this is the time period of TIMER1 */ double timer1_period; /* Expression: 0.571 */ double Constant_flux; /* Expression: 25rps, this is the rated speed of the induction */ /* machine */ double rated_speed; 2001 Thesis Project A2 Gareth S Roberts /******************************************************************/ /* Variables that are constantly updated throughout the */ /* operation */ /******************************************************************/ double wrm; double Tem; double theatre_r; double lambdare_r; double iqs; double ids; double slip_speed; double rho; double sin_rho; double cos_rho; double ialfa; double ibeta; double Ia_command; double Ib_command; double Ic_command; double Va_command; double Vb_command; double Vc_command; int old_cnt; /******************************************************************/ /* Inputs into the system */ /******************************************************************/ double double double double double Ia_feedback; Ib_feedback; Ic_feedback; Speed_input; Speed_feedback; /******************************************************************/ /* Parameter initialisation */ /******************************************************************/ void initalise_parm(void) { Speed_input = 0.0; Speed_feedback = 0.0; Gain_Kp = 30.0; Gain_Ki = 90.0; Gain_Ks = 10000.0; Gain_Kc = 1; Gain_G1 = 0.05817; Gain_G2 = 1; Gain_G3 = 6.711; Gain_G4 = 0.0163; Gain_G5 = 177.72; Gain_G6 = 0.66667; Gain_G7 = 0.33333; 2001 Thesis Project A3 Gareth S Roberts Gain_G8 = 0.57735; Integrator1 = 0.0; Integrator2 = 0.0; IntegratorA = 0.0; IntegratorB = 0.0; IntegratorC = 0.0; Integrator1_US = 20; Integrator2_US = 360; IntegratorI_US = 90; Integrator_LS = 0; IntegratorI_LS = -90; Constant_flux = 0.571; old_cnt = 0; rated_speed = 25; wrm = 0; Tem = 0; theatre_r = 0; lambdare_r = 0; iqs = 0; ids = 0; slip_speed = 0; rho = 0; cos_rho = 0; sin_rho = 0; ialfa = 0; ibeta = 0; Ia_feedback = 0; Ib_feedback = 0; Ic_feedback = 0; Ia_command = 0; Ib_command = 0; Ic_command = 0; Va_command = 0; Vb_command = 0; Vc_command = 0; } /* end of initalise parameters */ /* Call the Initalisation of Parameters setup method */ void initalise_parm(void); /* Call the Interrupt initialisation setup method */ void initInts(void); /* Call the PWM setup method */ void pwm_setup(void); /* Call the PWM setup method */ void encoder_setup(void); /* Call the A/D conversion setup method */ void adcsetup(void); /* Call the SCI setup method */ void scisetup(void); 2001 Thesis Project A4 Gareth S Roberts /******************************************************************/ /* The main program */ /* */ /******************************************************************/ void main(void) { unsigned int i; WDDISABLE; /* Disable the watchdog timer */ /* Prevent any interrupts during initialization */ INT_DISABLE; EVIMRA = 0x0000; /* Let everything stablise */ for (i = 0; i < 10000; i++); initalise_parm(); /* Initialize parameters */ pwm_setup(); encoder_setup(); adcsetup(); scisetup(); initInts(); /* Initialize interrupts */ while (1) { /******************************************************************/ /* Current feedback calculation */ /******************************************************************/ /* Capture of the current signals via the A/D converters, */ /* each signal capture will cause a 850ns delay for a 20Mhz clock */ /* cycle */ Ia_feedback = getadc(1); Ib_feedback = getadc(2); /* Utilisation of the balanced phase Y condition for an /* induction motor */ Ic_feedback = -(Ia_feedback + Ib_feedback); */ /* Conversion to analog current values */ Ia_feedback =-512; Ib_feedback =-512; Ic_feedback =-512; /* These feedback Ia_feedback Ib_feedback Ic_feedback 2001 Thesis Project values vary between -512 and 512 */ =*Gain_Kc; =*Gain_Kc; =*Gain_Kc; A5 Gareth S Roberts /******************************************************************/ /* The first summation block, PI compensation & Field_weakening */ /******************************************************************/ wrm = Speed_input - Speed_feedback; /* Calculation of the commanded electromagnetic torque command, Tem* */ Tem = (wrm * Kp_Gain) + Integrator1; /* Field_Weakening */ if (Speed_feedback => rated_speed) { lambdare_r = 100/(Speed_feedback^2) else { lambdare_r = Constant_flux; } /******************************************************************/ /* FO control code */ /******************************************************************/ /* Calculation of iqs^e* */ iqs = Gain_G1*(Tem/lambdare_r); /* Calculation of ids^e* */ ids = (Gain_G3*lambdare_r); /* Calculation of the rho */ rho = theatre_r + Integrator2; sin_rho = sin(rho); cos_rho = cos(rho); /******************************************************************/ /* The Inverse Park Transform */ /* (d,q) > (alfa, beta) */ /******************************************************************/ /* Calculation of Is(alfa) */ ialfa = (ids*cos_rho) - (sin_rho*iqs); /* Calculation of Is(beta) */ ibeta = (sin_rho*ids) + (cos_rho*iqs); /******************************************************************/ /* The Inverse Clarke Transform */ /* (alfa, beta) > (a,b,c) */ /******************************************************************/ /* Calculation of Isa_command */ Ia_command = Gain_G6*ialfa; /* Calculation of Isb_command */ Ib_command = -(Gain_G7*ialfa) + (Gain_G8*ibeta); /* Calculation of Isc_command */ 2001 Thesis Project A6 Gareth S Roberts Ic_command = -(Gain_G7*ialfa) - (Gain_G8*ibeta); /******************************************************************/ /* Summation of currents */ /******************************************************************/ /* Current error in phase A */ Ia_command =- Ia_feedback; /* Current error in phase B */ Ib_command =- Ib_feedback; /* Current error in phase C */ Ic_command =- Ic_feedback; /******************************************************************/ /* PI compensation of the current signals */ /******************************************************************/ /* Current error in phase A */ Va_command = (Ia_command*Gain_Kvp) + IntegratorA; /* Current error in phase B */ Vb_command = (Ib_command*Gain_Kvp) + IntegratorB; /* Current error in phase C */ Vc_command = (Ic_command *Gain_Kvp) + IntegratorC; /******************************************************************/ /* Integrator blocks */ /* */ /******************************************************************/ /* The calculation of Integrator1 updates its magnitude by /* integrating over the time period for timer1 Integrator1 = Integrator1 + timer1_period*Gain_Ki*wrm; */ */ /* Limits of integration1 */ if (Integrator1 > Integrator1_US) { Integrator1 = Integrator1_US; } else if (Integrator1 < Integrator_LS) { Integrator1 = Integrator_LS; }/* end of if */ /* Calculation of slip_speed*/ slip_speed = iqs*Gain_Gain5/ids; /* The magnitude of Integrator2 gets updated over the time period */ /* for timer1 */ Integrator2 = Integrator2 + slip_speed*timer1_period; /* Limits of integration2, if the slip angle exceeds 360 degrees, */ /* 360 is subtacted from it */ if (Integrator2 > Integrator2_US) { Integrator2 =- Integrator2_US; 2001 Thesis Project A7 Gareth S Roberts }/* end of if */ /* The magnitude of IntegratorA gets updated over the time period /* for timer1 */ IntegratorA = IntegratorA + 2*timer1_period; /* Limits of integration */ if (IntegratorA > IntegratorI_US) { IntegratorA = IntegratorI_US; } else if (IntegratorA < IntegratorI_LS) { IntegratorA = IntegratorI_LS; }/* end of if */ /* The magnitude of IntegratorB gets updated over the time period */ /* for timer1 */ IntegratorB = IntegratorB + 2*timer1_period; /* Limits of integration */ if (IntegratorB > IntegratorI_US) { IntegratorB = IntegratorI_US; } else if (IntegratorB < IntegratorI_LS) { IntegratorB = IntegratorI_LS; }/* end of if */ /* The magnitude of IntegratorC gets updated over the time period */ /* for timer1 */ IntegratorC = IntegratorC + 2*timer1_period; /* Limits of integration */ if (IntegratorC > IntegratorI_US) { IntegratorC = IntegratorI_US; } else if (IntegratorC < IntegratorI_LS) { IntegratorC = IntegratorI_LS; }/* end of if */ /* Wait for interrupts */ } /* end of while loop */ } /* end of main */ /******************************************************************/ /* The PWM interrupt routine */ /******************************************************************/ #define PWM_ISR c_int2 void PWM_ISR (void) { /* /* /* /* The calculated current values are now fed into the compare registers on the TMS320F243 DSP These values are compared with a triangular wave from the up/down counter to set the PWM duty ratio for this period */ 2001 Thesis Project A8 */ */ */ Gareth S Roberts CMPR1 = Va_command +250; CMPR2 = Vb_command +250; CMPR3 = Vc_command +250; if (old_cnt != T2CNT) { theatre_r =+ 0.18; /* Limits of theatre_r, if the slip angle exceeds 360 degrees, */ /* 360 is subtacted from it */ if (theatre_r > Integrator2_US) { theatre_r =- Integrator2_US; }/* end of if */ Speed_feedback = Gain_Ks/(T2CNT – old_cnt); old_cnt = T2CNT; /* clear interrupt level flag */ IFR = 0x0002; /* clear peripherial interrupt flag */ EVIFRA = 0x0100; } /* End of the PWM ISR */ /******************************************************************/ /* initInts () - Initalise processor interrupt registers */ /* */ /******************************************************************/ void initInts(void) { /* INT2 unmasked, timer period interrupt */ IMR = 0x0002; /* This is the peripheral interrupt flag */ EVIMRA = 0x0100; INT_ENABLE; /* Enable interupts */ } /* end of initalisation of the processor interrupts */ /******************************************************************/ /* pwm_setup (): */ /* T1PR Timer1 Period Register - 20Mhz/T1PR -frequency */ /* CMPR xCompare Register x -duty */ /* ORCA 7-4 I/O Mux Control Register A -set pwm pins */ /* ACTR 8-37 Compare Action Control Register -active high */ /* DBTCON 50ns Dead Band Timer Control Register -dead band */ /* COMCON 8-36 Compare Control Register -pwm */ /* T1CON 8-28 GP Timer Control Register -up */ /* GPTCON 8-30 GP Timer Control Register -up, pol */ 2001 Thesis Project A9 Gareth S Roberts /* */ /******************************************************************/ void pwm_setup(void) { /* Set period register for 20kHz = 20MHz/500*2 T1PR = 500; OCRA */ |= 0x0FC0; /* 00001111 11000100 */ ACTR = 0x0666; DBTCON = 0x02E0; /* 00001010 10101010 */ /* 00000010 11100000 */ CMPR1 CMPR2 CMPR3 = 0x0000; = 0x0000; = 0x0000; /* + - compare enabled |++ - reload compare register |||+ space vector not enabled ||||++ action control register reload ||||||+ - compare output pins enabled |||||||+ ++++++++- reserved |||||||| |||||||| 10000010 00000000 */ COMCON = 0x8200; /* ++ emulation control = not affected ||+++ - continuous up counting |||||+++ prescaler = |||||||| + not enable T2 as well |||||||| |+ - enable T1 |||||||| ||++ - internal clock as source |||||||| ||||++ - reload period on underflow or equal |||||||| ||||||+ enable compare operation |||||||| |||||||+- not used in T1 |||||||| |||||||| 10101000 00000010 */ T1CON = 0xE842; /* + counting up |+ - counting up || ++ - no adc event with timer || ||+-+ no adc event with timer || ||| |+ - compare output enable - enable || ||| || ++ - polarity timer - active high || ||| || ||++- polarity timer - active high || ||| || |||| 01100000 01001010 */ GPTCON = 0x604A; } /* end of pwm_setup line */ 2001 Thesis Project A10 Gareth S Roberts void encoder_setup(void) { /* info 8-66 * T2CNT 7-19 * T2PR 7-14 * T2CMPR 7-15 * T2CON 8-28 * CAPCON 8-59 */ T2CNT = 0x0000; T2PR = 0xFFFF; T2CMPR = 0x8FFF; /* ++ not affected by emulation suspend || ++ - Directional Up/Down Count mode || ||+++ Clock Prescalar = /1 || ||||| + Use own TENABLE bit || ||||| |+ - TENABLE - Enable Timer || ||||| ||++ - Clock Source - QEP Circuit || ||||| ||||++ - Register reload when counter is || ||||| ||||||+ TECMPR - enable timer compare || ||||| |||||||+- SELTPR1 - use own period register || ||||| |||||||| 11011000 01110010 */ T2CON = 0xD872; /* + -|++ -|||+ |||| + |||| |+ -|||| ||+ |||| ||| ++ -|||| ||| ||++ -|||| ||| ||||++-|||| ||| |||||| 01100000 11110000 CAPCON = 0x60F0; Clear all capture registers Enable QEP Circuit (bits 9, 7-4 ignored Disbale CAP3 GP Timer selection for cap3 = GP Timer GP Timer selection for cap1/2 = GP Timer CAP3TOADC = no event CAP1 Edge Detection = Detect both edges - * CAP2 Edge Detection = Detect both edges - * CAP3 Edge Detection = none */ } /******************************************************************/ /* adcsetup(): */ /* ADCTRL1 Analog to Digial Control register */ /* */ /******************************************************************/ void adcsetup() { 2001 Thesis Project A11 Gareth S Roberts /* ++ -||+ |||+ -|||| + -|||| |+ |||| ||+ -|||| |||+ |||| |||| + |||| |||| |+++ -|||| |||| |||| +++-|||| |||| |||| |||+|||| |||| |||| |||| 1101 1101 0010 0010 ADCTRL1 = 0xDD22; /* Soft and free bits, emulation suspend start conversion immediately Enable ADC#2 Enable ADC#1 Enable Continuous conversion Enable interrupts Interrupt flag, Bit is one while convertion ADC2 channel select, ADCIN02 ADC1 channel select, ADCIN02 Start ADC conversion */ this is the ADC control register */ /* this is the I/O port B Data & Direction reg */ PBDATDIR = 0x3000; } unsigned int getadc(int chan) { int crap = 0; if (chan > 6) { PBDATDIR = (PBDATDIR & ~0x0030) | ((chan-7) 6); } /* end of adcsetup */ 2001 Thesis Project A12 Gareth S Roberts /******************************************************************/ /* scisetup() */ /* */ /******************************************************************/ void scisetup() { /* + stop bits 0=1, 1=2 |+ - parity ||+ parity enable |||+ - loop back enable ||||+ Idle-line/address bit select |||||+++- Charactor length selector |||||||| 00000111 */ SCICCR = 0x07; /* + reserved |+ - Rx error interrupt enable ||+ software reset |||+ - reserved ||||+ Tx wake up method |||||+ - sleep mode enabled ||||||+ Tx enable |||||||+- Rx enable |||||||| 00100011 */ SCICTL1 = 0x23; /* 38400 BAUD, BRR = 63 */ SCIHBAUD = 0; SCILBAUD = 63; /* + Tx buffer ready |+ - Tx empty flag ||+ reserved |||+ - reserved ||||+ reserved |||||+ - reserved ||||||+ Rx/Bk interrupt enable |||||||+- Tx interrupt enable |||||||| 00000000 */ SCICTL2 = 0x00; OCRA |= 0x0003; } /* end of scisetup */ 2001 Thesis Project A13 Gareth S Roberts 2001 Thesis Project A14 Gareth S Roberts 2001 Thesis Project A15 Gareth S Roberts ... processes and variables are modelled mathematically Furthermore, the MATLAB program can convert a MATLAB design into a C-code design in a relatively straightforward manner Hence, this stage of the... two-phase currents to generate a means of instantaneously controlling the torque and flux Field-orientated controllers require control of both magnitude and phase of the AC quantities and are,... the induction motor? ??s many advantages are clearly explained Wildi also presents the two types of induction motors: “the squirrel cage induction motor? ?? and the “wound motor? ?? An explanation of the

Ngày đăng: 27/10/2013, 23:15

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan