Usage Simulation Man
Usage Simulation Man
Applied Intelligent Control of Induction Motor Drives Tze-Fun Chan and Keli Shi
© 2011 John Wiley & Sons (Asia) Pte Ltd
TMS320F28335 processor
1. Programs in Chapter 3
Applied Intelligent Control of Induction Motor Drives Tze-Fun Chan and Keli Shi
© 2011 John Wiley & Sons (Asia) Pte Ltd
Example 3. Programming by Simulink blocks with self-defined expression
Step 1. Open Simulink model “Example3_Park_transform.mdl” in the folder
“Chapter3_10”.
Step 2. Start the simulation.
2. Programs in Chapter 4
Neural-network simulation
Step 1. Set the current directory of MATLAB® to “Chapter4_3”.
Step 2. Open the Simulink model “SinCos_sample .mdl”. Start the simulation to create
data samples for training Park’s transformation matrix.
Step 3. Enter “ANN_train” into the MATLAB® command line to train the ANN model. A
trained ANN model is obtained.
Applied Intelligent Control of Induction Motor Drives Tze-Fun Chan and Keli Shi
© 2011 John Wiley & Sons (Asia) Pte Ltd
Step 4. Open the Simulink model “ABC_DQ_ANN.mdl”. Copy the trained ANN model
into “ABC_DQ_ANN.mdl” to replace the old ANN model.
Step 5. Start the simulation for Park’s transformation using ANN.
3. Programs in Chapter 5
Step 1. Open the Simulink model “dsc.mdl” in the folder “Chapter5”. Start the simulation
for a DSC controller.
Step 2. Open the Simulink model “dsc_noise.mdl” in the folder “Chapter5”. Start the
simulation of the DSC controller with drift noise of measured stator current.
Step 3. Open the Simulink model “acc_75.mdl” in the folder “Chapter5”. Start the
simulation for the expert-system controller for a 7.5 kW induction motor.
Step 4. Open the Simulink model “acc_075.mdl” in the folder “Chapter5”. Start the
simulation for the expert-system controller for a 0.75 kW induction motor.
4. Programs in Chapter 6
5. Programs in Chapter 7
Programming example 1
Open the Simulink model “Exp1_dsc.mdl” from the sub-folder “Example1” in the folder
“Chapter7_5” and start the simulation.
Programming example 2
Step 1. Open the Simulink model “Exp2_ANN.mdl” from the sub-folder “Example2” in
the folder “Chapter7_5”.
Step 2. Start the simulation for the direct self control system with neural network based
optimum switching table.
6. Programs in Chapter 8
Open the Simulink model “im_chapter8_4.mdl” in the folder “Chapter8_4” and start the
simulation for an induction motor drive.
Open the Simulink model “SVPWM.mdl” in the folder “Chapter8_4” and start the
Simulink model to simulate a space vector PWM inverter.
Applied Intelligent Control of Induction Motor Drives Tze-Fun Chan and Keli Shi
© 2011 John Wiley & Sons (Asia) Pte Ltd
ANN training programs in section 8.4
Step 1. Set the current directory of MATLAB® to “Chapter8_4”.
Step 2. Open the Simulink model “Sample_Data.mdl” in the folder “Chapter8_4” and
start the simulation to create data sample data for training ANN1, ANN2, ANN4.
Step 3. Run the program “ANN_train.m” in the current directory to train ANN1, ANN2,
ANN4.
Step 4. Open the Simulink model “Sample_Data_block_rotor.mdl” in the folder
“Chapter8_4” and start the simulation to create data samples for training ANN3.
Step 5. Run the program “ANN_train_block_rotor.m” in the current directory to train
ANN3.
Load estimation
Step 1. Set the current directory of MATLAB® to “Load” in folder “Chapter8_7”.
Step 2. Open the Simulink model “Load_estimation.mdl” in the current directory.
Step 3. Start the simulation to estimate the load.
Step 4. Run the program “load_error.m” in the current directory to calculate the error of
the estimated load.
Flux estimation
Step 1. Set the current directory of MATLAB® to “Flux” in folder “Chapter8_7”.
Step 2. Open the Simulink model “Flux_est.mdl” in the current directory.
Step 3. Start the simulation to estimate the flux.
Step 4. Run the program “Flux_error.m” in the current directory to calculate the error of
the estimated flux.
Speed estimation
Step 1. Set the current directory of MATLAB® to “Speed” in folder “Chapter8_7”.
Step 2. Open the Simulink model “Speed_est.mdl” in the current directory.
Step 3. Start the Simulink model to estimate rotor speed.
Step 4. Run the program “Speed_error.m” in the current directory to calculate the error of
the estimated rotor speed.
Applied Intelligent Control of Induction Motor Drives Tze-Fun Chan and Keli Shi
© 2011 John Wiley & Sons (Asia) Pte Ltd
Programming example 1. Field-oriented control (FOC) system
Step 1. Set the current directory of MATLAB® to “Example1” in folder “Chapter8_8”.
Step 2. Open the Simulink model “Exp1_FOC.mdl” in the current directory. Start the
simulation for the field-oriented control (FOC) system.
7. Programs in Chapter 9
8. Programs in Chapter 10
A. Section 10.2
B. Section 10.3
Applied Intelligent Control of Induction Motor Drives Tze-Fun Chan and Keli Shi
© 2011 John Wiley & Sons (Asia) Pte Ltd
Step 2. Enter “Random_Frequency” into the MATLAB® command line to simulate
random-carrier-frequency PWM and to evaluate the PWM waveform. Compare the
results with Fig.10-10 in the book.
C. Section 10.4
Applied Intelligent Control of Induction Motor Drives Tze-Fun Chan and Keli Shi
© 2011 John Wiley & Sons (Asia) Pte Ltd
GA based Optimized hybrid random pulse-position and pulse-width PWM
Step 1. Set the current directory of MATLAB® to the sub-folder
“GA_Position_and_Width” in the folder “Chapter10_4”.
Step 2. Enter “Start_PW” to start GA optimization program for hybrid random pulse-
position and pulse-width PWM.
Step 3. Compare the results with Fig.10-23, Fig.10-24, and Table 10-3 in the book.
D. Section 10.5
9. Programs in Chapter 11
Step 1. Connect the TMS320F28335 experiment board to the PC by a USB interface and
start Code Composer Studio (CCS) software.
Step 2. Connect the Code Composer Studio (CCS) to the TMS320F28335 processor by
selecting item “Connect” from the CCS “Debug” menu.
Step 3. Reset CPU of the processor and load the executable code
“F28335_example_PWM.out” into the processor by selecting the item “Load Program”
from the CCS “File” menu. The file “F28335_example_PWM.out” is in the “Debug”
folder.
Step 4. Connect pins of the processor, GPIO0 (PWM1A), GPIO2 (PWM2A), and GPIO4
(PWM3A) to the oscilloscope channel 1, channel 2, and channel 3. Click key “F5” to run
Applied Intelligent Control of Induction Motor Drives Tze-Fun Chan and Keli Shi
© 2011 John Wiley & Sons (Asia) Pte Ltd
the executable code in the processor and the PWM waveforms can be observed on the
oscilloscope.
Step 5. Select “Open” in the “Project” menu of CCS window to open the project file
“F28335_example_PWM.pjt” (which is located in the folder “CD/Chapter11/
Example1_PWM/projects”) to view all the source codes.
RTDX programming
Step 1. Connect the TMS320F28335 experiment board to the PC by a USB interface and
start Code Composer Studio (CCS) software.
Step 2. Connect the Code Composer Studio (CCS) to the TMS320F28335 processor by
selecting item “Connect” from the CCS “Debug” menu.
Step 3. Reset CPU of the processor and load the executable code “RTDX.out” into the
processor by selecting the item “Load Program” from the CCS “File” menu. The file
“RTDX.out” is in the “Debug” folder.
Step 4. Enable RTDX in CCS by opening the “RTDX Control” window from “RTDX”
folder in the “Tools” menu on the CCS, then selecting the “RTDX Enable” box from the
opened “RTDX Control” window.
Step 5. Start MATLAB® and set the current directory of MATLAB® to “MATLAB” in the
folder “Example2_RTDX”.
Step 7. Select “Open” in the “Project” menu of CCS window to open the project file
“RTDX.pjt” (which is located in the folder “CD/ Chapter11/ Example2_RTDX”) to view
all source codes.
ADC programming
Step 1. Connect the positive electrode of a battery to the pin “ADCINA0” on the
TMS320F28335 processor and the negative electrode to the ground of the processor.
Applied Intelligent Control of Induction Motor Drives Tze-Fun Chan and Keli Shi
© 2011 John Wiley & Sons (Asia) Pte Ltd
Step 3. Connect the Code Composer Studio (CCS) to the TMS320F28335 processor by
selecting item “Connect” from the CCS “Debug” menu.
Step 4. Reset CPU of the processor and load the executable code “F28335_ADC.out”
into the processor by selecting the item “Load Program” from the CCS “File” menu. The
file “F28335_ADC.out” is in the “Debug” folder.
Step 5. Enable RTDX in CCS by opening the “RTDX Control” window from “RTDX”
folder in the “Tools” menu on the CCS, and then selecting the “RTDX Enable” box from
the opened “RTDX Control” window.
Step 6. Start MATLAB® and set the current directory of MATLAB® to “MATLAB” in the
folder “Example3_ADC”.
Step 8. Select “Open” in the “Project” menu of CCS window to open the project file
“F28335_example_ADC.pjt” (which is located in the folder “CD/Chapter11/
Example3_ADC/ projects” to view all the source codes.
CAP programming
Step 1. Connect GPIO0 pin of the processor to GPIO5 pin by a conducting wire and
connect GPIO0 pin to the oscilloscope channel 1.
Step 2. Connect the TMS320F28335 experiment board to the PC by a USB interface and
start Code Composer Studio (CCS).
Step 3. Connect the Code Composer Studio (CCS) to the TMS320F28335 processor by
selecting item “Connect” from the CCS “Debug” menu.
Step 4. Reset CPU of the processor and load the executable code
“F28335_example_CAP.out” into the processor by selecting the item “Load Program”
from the CCS “File” menu. The file “F28335_example_CAP.out” is in the “Debug”
folder.
Step 5. Enable RTDX in CCS by opening the “RTDX Control” window from the
“RTDX” folder in the “Tools” menu on the CCS, and then selecting the “RTDX Enable”
box from the opened “RTDX Control” window.
Step 6. Start MATLAB® and set the current directory of MATLAB® to “MATLAB” in the
folder “Example4_CAP”.
Applied Intelligent Control of Induction Motor Drives Tze-Fun Chan and Keli Shi
© 2011 John Wiley & Sons (Asia) Pte Ltd
Step 7. Perform the program “Example_CAP.m” on MATLAB® platform.
Step 8. Select “Open” in the “Project” menu of CCS window to open the project file
“F28335_example_CAP.pjt” (which is located in the folder “CD/Chapter11/
Example4_CAP/ projects”) to view all the source codes.
Applied Intelligent Control of Induction Motor Drives Tze-Fun Chan and Keli Shi
© 2011 John Wiley & Sons (Asia) Pte Ltd