This action might not be possible to undo. Are you sure you want to continue?
DC Motor Control Lab using xPC Target On Feedback Modular Servo System MS150 Manual Book
RMIT University School of Electrical and Computer Engineering
School of Electrical and Computer Engineering Control Group
Control Group @04.2010
School of Electrical and Computer Engineering Control Group
Please check the Feedback website for THE HEALTH AND SAFETY AT WORK ACT 1974, PRODUCT IMPROVEMENTS, COMPONENT REPLACEMENT, DECLARATION CONCERNING ELECTROMAGNETIC COMPATIBLITY and its COPYRIGHT NOTICE BEFORE starting the lab.
The first chapter is a brief introduction of the Modular Servo System MS150. The copyrights of the product, MS150 belong to Feedback Company. Please contact Feedback Company or check its official website to obtain the authorized manual book with detailed datasheets. The xPC Target System which is a Mathworks product, Mathworks holds the copyrights of it. The Second Chapter only refers a part of its content which will be used in the lab system.
RMIT University reserves all the copyrights of the lab design. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, without the prior permission of RMIT University.
School of Electrical and Computer Engineering Control Group
Contents Chapter1. Introduction of the Feedback MS150 Sy1stem
Overview of Feedback Modular Servo System MS150…….2
Units Used in the DC Motor Speed Control Lab……………….3
Chapter2. Introduction of the XPC Target System
Connection and Communication between the Host and XPC
Target…………………………………………………… ……………..….7 Chapter3. DC Motor Speed Control Lab
Overview of the DC Motor Speed Control Lab……………….11
MS150 Setting for DC Motor Speed Control Lab…………...12
xPC Target System Configuration for Motor
RMIT University School of Electrical and Computer Engineering Prof. Liuping Wang, Dr. N.V. Truong, Dae Yoo, Xuan Liu, Rex Lee.
V. 2 . Xuan Liu.School of Electrical and Computer Engineering Control Group Speed Control Lab………………………………………………………… ………………………14 4. Lab Activities………………………………………………… ………………. Dae Yoo. Further Development…………………………………………… …….24 Reference……………………………………………………………… …………………………….26 RMIT University School of Electrical and Computer Engineering Prof.21 5. Truong.. N. Rex Lee. Dr. Liuping Wang.25 Appendix……………………………………………………………… …………………………….
1 depicted. In both systems. For example.1. Also.V. These MS150 units are usually connected into either a DC system labeled as MS150. the units have diagrams on the surface indicating their inner connection and functions. or an AC system labeled MS150A. Truong. Liuping Wang. Introduction of the Feedback MS150 System 1. Rex Lee. Figure1. it is ideally suitable to be used in basic engineering training programs.1 Overview of Feedback Modular Servo System MS150 The Feedback Modular Servo System was designed to help students understand the principle of open or closed-loop control theory. the Reduction Gear Tacho Unit GT150X is normally used to acquire the feedback in terms of the motor rotating speed.School of Electrical and Computer Engineering Control Group Chapter1. 3 . As the Fig.1 Overview of MS150 Other features of the system can be found on the Data Sheet of MS150 that can be downloaded from Feedback website. Dae Yoo. Each unit has its unique functions. Xuan Liu. from which RMIT University School of Electrical and Computer Engineering Prof. speed or position control may be implemented. The system consists of a magnetic base platform and several units which can be attached onto the base with magnetic force. N. Dr.
The DC Motor Unit. PS150E. Truong. Liuping Wang. SA150D.V. Dae Yoo. GT150X. of MS150 can have a more complete In this manual. In the DC Motor Control Lab. The Servo Amplifier Unit. Dr. 4 . the following equipment in MS150 is required: The Power Supply Unit. The Reduction Gear Tacho Unit. Xuan Liu. N.School of Electrical and Computer Engineering Control Group users understanding. RMIT University School of Electrical and Computer Engineering Prof. only the DC system MS150 will be introduced. Rex Lee. DCM150F.
The unit supplies +24v dc unregulated at 2A. Dr. Rex Lee. 50/60Hz. 9-0-9v RMIT University School of Electrical and Computer Engineering Prof. Xuan Liu. +/-15v regulated at 0.2 DC Motor Speed Control Lab Units PS150E The unit PS150E serves as the power supply of the system.School of Electrical and Computer Engineering Control Group Chapter1.5A. Dae Yoo. as the figures depicted below.V.2 Units Used in the DC Motor Speed Control Lab General functions of these units can be directly read from the surface of each unit. 5 . Liuping Wang. Inputs are 120v~2A(T) and 230v~1A(T). Figure1. Truong. N. 18v ac at 1A. where only some important features are specifically introduced. Introduction of the Feedback MS150 System 1. Please refer to Feedback official website to download more detailed data sheets.
The torque is 2A for 0. Chapter1. The unit is usually connected to the Servo Amplifier Unit SA150D. Rex Lee. Dae Yoo. which has the limitation speed at 3000 radium/min. Xuan Liu. 6 . Liuping Wang.V.75 volts/(1000r/min).1 Nm. N. or 5V/ (1800r/min). RMIT University School of Electrical and Computer Engineering Prof. There is a protection circuit built inside to avoid overload of the motor. DCM150F The motor in this unit is a permanent magnet DC motor. Introduction of the Feedback MS150 System SA150D This unit is used to operate either the DC motor in the lab. The speed feedback of the motor can be read directly from the unit in terms of 2. or an AC motor system in MS150. GT150X The Reduction gear tacho unit installed a 30/1 reduction gear and a tacho-generator.School of Electrical and Computer Engineering Control Group at 10mA. Truong. Dr.
XPC target system incorporates a Real Time Workshop which allows the users to verify their models and generate executable program code using the embedded C/C++ compiler. Subsequently. the XPC Target System runs the real-time applications on the separate target PC. including sending control signals and collecting feedback information back. In addition. xPC target toolbox must be installed in the host PC. 7 RMIT University School of Electrical and Computer Engineering Prof. Finally. To run the realtime applications. either a Microsoft Visual C/C++ compiler.1 Overview of XPC Target System “xPC is the solution for prototyping. . Dr. and the users can change the parameters of the models on the host PC to prototype. The PCI card should be connected to the control targets via break out board. Rex Lee. Liuping Wang. When the executable code has been generated. XPC Target System downloads it from the host PC to the target PC through the Ethernet or RS232 connection. testing and deploying real-time systems. Dae Yoo. Introduction of the XPC Target System 2. a National Instruments PCI card should also be installed in the target PC.V.” Fundamental Structure of the XPC Target System The XPC Target System consists of a host PC and one or several target PCs. The models can be simulated or “built” in non-real time mode there. or state-flow charts from the MATLAB libraries on the host PC. test and deploy their systems in real-time. at least one target PC which must provide available I/O connection to the host PC (this can be Ethernet interface or RS232 interface) and the corresponding data cable to connect them. Requirements of the XPC Target System Hardware requirements: the system requires a PC to be the host PC. or an Open Watcom C/C++ compiler should be prepared in the host PC in order to generate the executable code. Xuan Liu. N. Truong.School of Electrical and Computer Engineering Control Group Chapter2. Software requirements: the MATLAB software and its Simulink and Real-Time Workshop. users can create Simulink models with blocks. In this environment.
Truong. 8 . Liuping Wang. Dae Yoo. Xuan Liu. Rex Lee. RMIT University School of Electrical and Computer Engineering Prof.V.School of Electrical and Computer Engineering Control Group Features of the xPC Target System: please refer to the Mathworks website for this information of this part. N. Dr.
including sending control signals and collecting feedback information. Truong. or go to the National Instruments website to download the relative data sheets. a National Instruments PCI board and its suitable break out board are required. The PCI card is one of the most widely adopted internal buses for PCs. Xuan Liu. Introduction of the XPC Target System 2. Fig2.School of Electrical and Computer Engineering Control Group Chapter2. N. NI PCI 6024E and the break board NI CB-68LP are employed. Rex Lee.2 National Instruments PCI Card For data acquisition in the xPC Target System. Dr. 9 . The PCI card should be connected to the control targets via its matched interface card. Please check our appendix. Dae Yoo. To run the real-time applications. Liuping Wang. In our lab.V.1 PCI card and its installation RMIT University School of Electrical and Computer Engineering Prof. a National Instruments PCI card should also be installed in the target PC.
Finally. the control target.2. In Fig2. and the real. XPC Target users should first set up the host PC and target PC.V. N. there are two scopes on the screen corresponding to the two Target scopes in the Simulink model. target PC may send misleading control signal to the control target and cause damage. Caution: Do NOT turn on any control target power before a proper model has been downloaded to the target PC. As the figure shows. Rex Lee. the laptop is used as the host PC with a Simulink model running on it. users can connect the target pc to the host pc using available data cable. The monitor is used to observe signals from the xPC Target System.School of Electrical and Computer Engineering Control Group Chapter2. Introduction of the XPC Target System 2. 10 .time applications can be operated on the target PC. RMIT University School of Electrical and Computer Engineering Prof. Otherwise. Ethernet cable is recommended for its stability and high data transmitting speed. Dae Yoo. Liuping Wang. Remember Simulink models will be built and simulated on the host PC. Once it has been finished. Truong.2. Xuan Liu.3 Connection and Communication between the Host and XPC Target Please check the requirements of the XPC Target System first before starting the connection and communication between the host PC and Target PC 1) Physical Connection As depicted in Fig2. and the PC behind it is the target PC which is connected to the monitor. MS150 system shown as on the left hand side of the figure can be connected to the target pc through PCI and its interface card. Dr. the bar on the top describes the setting of the current system. namely in this lab.
V. Xuan Liu. Dae Yoo.School of Electrical and Computer Engineering Control Group Fig2. Liuping Wang.2 xPC Target System connection RMIT University School of Electrical and Computer Engineering Prof. Truong. 11 . Rex Lee. Dr. N.
Two options for host target communication are available to select on the right window where users can use their own customized settings. Fig2. b) On the left window. c) Change to “configuration” on the left window. Xuan Liu. including through CD boot.V. click on “communication”. 12 .School of Electrical and Computer Engineering Control Group Chapter2. Liuping Wang. and type in the command “xpcexplr” to run the xPC Target Explorer as shown below. and COM is for RS232 serial interface). floppy boot and so forth. The selection should depend on the physical connection (TCP/IP is for Ethernet interface. Dr. users need to complete the following operations: a) To start with.3 xPC Target Explorer Using the xPC Target Explorer. Introduction of the XPC Target System 2) xPC Target Explorer Setting Run the Matlab on the host PC. user should select the C/C++ compiler from “Compilers Configuration”. Truong. Dae Yoo. RMIT University School of Electrical and Computer Engineering Prof. N. Rex Lee. Users should be able to see multiple approaches to boot the XPC Target System. under “Target PCx”.
Dae Yoo.V. Fig2. Xuan Liu. Liuping Wang. do not change the communication settings. Introduction of the XPC Target System e) After completing the above three steps. Rex Lee. The target PC will be connected to the host PC. a) Type in command “simulink” and execute to open the Simulink Library Browser as the following figure shows. The target PC will log onto the xPC Target System. right click on “TargetPCx” and select “connect”. d) Insert the CD into the target PC. Dr. 3) Simulink model setting Now users may create a fundamental Simulink I/O test model and set up the simulation parameters.School of Electrical and Computer Engineering Control Group Create an image file of the boot disk and burn it to a CD for instance.4 Simulink Library Browser 13 RMIT University School of Electrical and Computer Engineering Prof. Chapter2. Truong. and boot its system directly from the CD drive. N. .
Dae Yoo. Truong.5 indicated. Rex Lee.V. N. xPC Target blocks library is located at the bottom of the entire library. Xuan Liu. it is inevitable to set solver options as well as the Real-Time Workshop options properly as the Fig2. Dr. 14 . Liuping Wang.School of Electrical and Computer Engineering Control Group b) Create a simple I/O test model using the blocks from the library. In the configuration. select “Simulation>Configuration Parameters”. c) From the menu of the Simulink model. RMIT University School of Electrical and Computer Engineering Prof.
e) Real-Time Workshop: select “System Target File” “xPCtarget.V. and set stop time long enough for observation. as f) After the above three steps have been finished. Introduction of the XPC Target System Fig2.School of Electrical and Computer Engineering Control Group Chapter2. Xuan Liu. Liuping Wang. Rex Lee. model can be downloaded by clicking on the “built” button.tlc” for XPC Target System to generate C code.5 Simulation Configuration d) Solver: normally set start time as 0s. Dae Yoo. RMIT University School of Electrical and Computer Engineering Prof. N. 15 . Truong. Dr. g) Turn on the power of the control target and run the real-time application normally or externally. In the lab environment. Fundamental sampling time should be faster than any of sample time setting of the blocks in the model. Fix-step type of solver is highly recommended.
The following section explains how to precede system identification and PID control on this platform.1 Overview of the DC Motor Speed Control Lab The DC Motor Speed Control Lab is designed ideally for students to get familiar with the Advanced Control Theory including system identification and PID control. 16 . In this chapter. collect data and operate real-time parameter tuning. the effects of proportional. The lab can be easily extended using the potentio -meter unit of MS150. integral and derivative controller can be observed directly. Dae Yoo. With real-time parameter tuning on the model blocks or subsystem masks. Truong. Liuping Wang. • • • RMIT University School of Electrical and Computer Engineering Prof. Dr. the connection of the MS150 system and the set up of the xPC Target System for the DC Motor Speed Control Lab will be introduced in the first and second section. Features • Graphical model design is intuitive for students to understand the control theory. The last section generalizes the possibilities for further development for this lab environment. Rex Lee. Xuan Liu.V. N. The lab will impress students by allowing them to build and simulate a model on an xPC Target realtime device. • • The signals can be directly observed on the target PC monitor. and professional programmers can design GUI interface for the lab with Microsoft Visual Basic Express or directly generate from Matlab. DC Motor Speed Control Lab 3.School of Electrical and Computer Engineering Control Group Chapter3. Numerical data can be collected and exposed to Matlab platform for precise analysis. MS150 system provides an easy-to-learn control target.
Xuan Liu. RMIT University School of Electrical and Computer Engineering Prof. The connector blocks include standoffs for use on a desktop or mounting in a custom panel. Truong. digital to analog output 1. 17 .1. Dr. Dae Yoo. N. the following terminals are employed in the DC Motor Speed Control Lab: 22: DAC0OUT1. The CB-68LP has a vertically mounted 68-pin connector.1 DC Motor Speed Control Lab Wire Connection 2) Connect to NI CB-68LP board The NI CB-68LP board is a “Low-cost termination accessories with 68 screw terminals for easy connection of field I/O signals to the counter/timer devices.2 MS150 Setting for DC Motor Speed Control Lab 1) Physical Connection on MS150 a) MS150 DC Motor standard connection • Supply power to unit PS150E and connect it to unit SA150D through the port special for Servo Amplifier. b) Lab connection Please connect the wires to the ports on each unit according to the following figure. Rex Lee. • Connect the Servo Amplifier to the DC motor unit DCM10F. Figure3.School of Electrical and Computer Engineering Control Group Chapter3.5mm Hex Key to tight their coupler.” As it shown in Fig3. Liuping Wang. • Connect the DC motor unit DCM150F to the reduction gear unit GT150X by using a 2. DC Motor Speed Control Lab 3.V.
Fig3.2 NI CB-68LP 3) Trouble Shooting Only the most frequently appeared problems and their possible solutions are listed below. Make sure the bearing is stably fixed to the unit. 67: AIGND. Xuan Liu. analog output ground.School of Electrical and Computer Engineering Control Group 55: AOGND. analog channel 0. If not. Dae Yoo. . Dr. Maybe. Liuping Wang. • Feedback delay: if the feedback information is not reasonable and the response is too slow. No feedback on xPC Target monitor: if there is not any feedback depicted on xPC Target monitor. Please check the appendix for the entire pin assignment table of NI PCI 6023E/6024E for further development in the future. please check the bearing of the unit GT150X. 18 • • RMIT University School of Electrical and Computer Engineering Prof. please first confirm whether there is reasonable feedback shown on the unit GT150X. N. 68: ACH0. Truong. Motor noise: if the motor is too noisy even under low input gain situation. Rex Lee. Chapter3. Another possible problem could be the misalignment between the bearings of the two units. please check the coupling between the unit DCM150F and GT150X. DC Motor Speed Control Lab This pin assignment is specially used for NI PCI 6023E/6024E.V. analog input ground. please check the physical connection according to the above two sections. it was not tighten enough.
School of Electrical and Computer Engineering Control Group Otherwise.V. Liuping Wang. please check the pin assignment table to see whether they match with the design of your model blocks. RMIT University School of Electrical and Computer Engineering Prof. 19 . • Please Note: the channel number on the pin assignment table is indicated by that number plus one in the Simulink blocks. Rex Lee. Truong. N. Dae Yoo. Dr. Xuan Liu.
As the above figure shows. 1) xPC Explorer Start Matlab and run xPC Target Explorer Fig3. the xPC Target Hierarchy can be observed from the left hand side of the window.3 xPC Target System Configuration for Motor Speed Control Lab Before configuring the xPC Target System. Xuan Liu. 20 . Another important step that has to be completed is to burn a boot disk for xPC Target System and record its settings. Subsequently.3 xPC Target Explorer The xPC Target Explorer is the interface for the xPC Target System users to set up the configuration for the connection between the host PC and one or several target PCs. Dr.V. DC Motor Speed Control Lab 3. Liuping Wang. Dae Yoo. N. It shows the compilers RMIT University School of Electrical and Computer Engineering Prof. Users should learn the example and configure their system according to their customized settings.School of Electrical and Computer Engineering Control Group Chapter3. Please note: the following explanation is an example for the xPC Target System configuration. Rex Lee. we can start configuring the xPC Target System according to the following steps. Truong. it is important to ensure the physical connections of the system correspond with the above chapters.
Dae Yoo. RMIT University School of Electrical and Computer Engineering Prof.School of Electrical and Computer Engineering Control Group configuration. 21 .dlm files and all the Target PCs settings. Rex Lee. Xuan Liu. the current directory to the . Liuping Wang. N. Truong. Dr.V.
Liuping Wang. Dr. both of them need to be matched with users’ current Matlab version.V. Set communication between the host and target PC Fig3. N. 22 . Please browse the Mathworks website to check the version matching table.School of Electrical and Computer Engineering Control Group Chapter3.4 C/C++ program compiler for xPC Target Users can select Watcom to use Open Watcom as a compiler or select VisualC as a compiler. DC Motor Speed Control Lab Set C/C++ program compiler Fig3. Truong.5 Communication between host and target PC RMIT University School of Electrical and Computer Engineering Prof. Dae Yoo. However. Rex Lee. Xuan Liu.
Leave the DNS Server part blank. Subnet: 255.0. subnet mask and default gateway same as the boot disk setting and change the last digit of the IP address to a different number. users may have to install a driver to the system. the driver for the connected USB should be installed. if a laptop without serial port will be used as a host PC. Subnet: 255. For example.168. Another requirement is that the host pc IP should also be set properly.0.254. For this option. users should ensure that the settings including the port number and the band rate match with the physical connection.School of Electrical and Computer Engineering Control Group Chapter3. and then select Internet Protocols (TCP/IP). 23 . Liuping Wang.168.1. all the settings should correspond to the boot disk setting (Please check Chapter2 to learn how to create a boot disk). Xuan Liu. users are allowed to set the target PC IP address. However. TCP/IP was selected. For example. the host PC did not recognize the connection.V. which stands for the communication through the serial port “COM”.5. Fill in the IP address. For example. RMIT University School of Electrical and Computer Engineering Prof.2. If in case. N.220.127.116.11. The IP address of the host PC should be set as: IP Address: 192.168. Right click on the icon and select properties. Once it has been selected. Gateway: 192. a RS232 to USB converter cable can be used.254. Dr. DC Motor Speed Control Lab As it shown in fig3. if the IP address is set as below in the boot disk: IP Address: 192. all the TCP/IP options are activated. Gateway: 192. Rex Lee.255. but in this case. Truong.255.0.255. The other option for the host target connection is RS232. Users may check the physical connection through device management on the host PC. Dae Yoo.255. which means the host PC and the target PC should be connected through a Lan cable. Please find the current Network Connection from Control Panel.
xPC Target-> A/D->National Instruments -> E-series -> PCI6024E AD. Also. N. DC Motor Speed Control Lab 2) Simulink model Run Simulink and create a model Fig3. xPC Target-> Misc. Liuping Wang. 24 . Truong.School of Electrical and Computer Engineering Control Group Chapter3.6 create a Simulink model Design an I/O test model using xPC Target blocks Scroll down to the bottom of the library to find “xPC Target” type and find the blocks through the following path: xPC Target-> D/A ->National Instruments -> E-series -> PCI6024E DA. Dr. -> Scope(xPC). RMIT University School of Electrical and Computer Engineering Prof. Rex Lee.V. find a Pulse Generator in the Source library. Dae Yoo. connect them together as the following figure depicts. Xuan Liu. Finally.
Select solver according to the expectations. DC Motor Speed Control Lab 3) Simulink Parameter Configuration a) Solver configuration: Start time-> 0.7 I/O test model Chapter3.001. the solver type is expected to be fixed step. Xuan Liu. Since the lab is the RMIT University School of Electrical and Computer Engineering Prof. Liuping Wang. For the DC Motor Speed Control Lab. Fig3.School of Electrical and Computer Engineering Control Group Fig3. Truong. Dr. Stop time-> inf. Rex Lee. Fixed step size ->0. Solver type-> Fixed Step.V. N. 25 .8 Simulink Solver Configuration The above configuration set the running time as from the very beginning to infinite. Dae Yoo.
It is impossible to estimate the solver step in real time. Xuan Liu. 26 . the other option. Truong. variable-step cannot be applied.School of Electrical and Computer Engineering Control Group real-time speed control of the dc motor. N. Rex Lee. RMIT University School of Electrical and Computer Engineering Prof.V. Dr. Dae Yoo. Liuping Wang.
Dr.tlc” Fig3.tlc” is built on the basis of the general C program compiler. Xuan Liu. and specifically designed for xPC Target applications so that the Real-Time Workshop on Matlab can generate executable code according to the Simulink models that users created. RMIT University School of Electrical and Computer Engineering Prof. “xpctarget. Truong. N.tlc” tells the Real-Time Workshop to generate the C program specifically for xPC Target System. The compiler selected in xPC Target Explorer setting is a general C program compiler. Dae Yoo.School of Electrical and Computer Engineering Control Group Chapter3. Rex Lee. DC Motor Speed Control Lab b) Real-Time Workshop Configuration Select system target file as “xpctarget.V. 27 . Liuping Wang.9 Real-Time Workshop Configuration The file “xpctarget.
If there is any problem. please check the device management to make sure the setting of the port is matched. Truong. please check the following session for trouble shooting. Rex Lee. connect to target PC and run it in real time. 2) Trouble Shooting Only the most frequently appeared problems and their possible solutions are listed below. DC Motor Speed Control Lab 1) Run the model Build the model. run and adjust a model properly. please browse the Mathworks website and ensure the version of the complier matches with that of the installed Matlab.V. users should first confirm the complier is installed in the valid directory of Matlab. • • RMIT University School of Electrical and Computer Engineering Prof. N. “Com” communication is not available: please ensure the driver of the serial port has been installed into the operation system. 28 . Xuan Liu. if there is still any problem. Dr. Liuping Wang. Cannot find xPC Target library: please install the toolbox of xPC Target into your Matlab. • Complier: if there is any warning about the complier. Dae Yoo. Please check the following section for how to create. Also.School of Electrical and Computer Engineering Control Group Chapter3.
V. PCI-6024E National Instr. Since in this lab. Liuping Wang. The amplitude of the reference can be set in the parameter settings of the Reference block. Constant input to pin 1 of the Switch 1: this is always set to be zero to eliminate the noise from pin 1 when it is not connected into the control loop. N. it represents analog channel0. . Rex Lee. the channel should be set as . or it can be changed directly on Gain even during the motor is running. The 29 • • RMIT University School of Electrical and Computer Engineering Prof.School of Electrical and Computer Engineering Control Group Chapter3. pin 68 was connected. According to the pin assignment table. in the Simulink model. • Reference and Gain: these two blocks are used to set the reference point for the control target DC motor. Dae Yoo.10 System Identification and PID control Simulink model As an example. Therefore.4 Motor Speed Control Lab Activities PID controller Simulink model example Fig3. The meaning for each part is explained as below. the above Simulink model employs the blocks from xPC Target Library and realizes the function of System Identification and PID control. Dr. Xuan Liu. Truong. DC Motor Speed Control Lab 3. Analog Input: this block is employed to collect feedback information from the MS150 system.
DC Motor Speed Control Lab • PCI-6024E National Instr. or numerical mode. The channel setting principle is the same with PCI-6024E National Instr. Rex Lee. users can right click on the block and select “look under mask”. Dae Yoo. N. integral and derivative control. Dr. which is corresponding to the gain of proportional. ki. respectively. The inner structure will then appears in a separate window. kp. • • • Fig3. Analog Output: this block is applied to send control signals out to the control target.V. and are specifically designed to show control information on the monitor of the target PC. Chapter3. PID control will be employed. For example. and kd. Liuping Wang.School of Electrical and Computer Engineering Control Group channel number on I/O connector pin assignment table is always augmented by one when presented in Matlab. The system is in System Identification mode if both of switches 1 and 2 are connected to pin 1. PID Controller: the controller is actually a subsystem block. Truong. Switch 1&2: the switches are used to switch the operation mode. users can determine whether to show the data in graphical mode. 30 .11 PID Controller under mask RMIT University School of Electrical and Computer Engineering Prof. The data can be shown in several ways according to the settings of the block. if both of the switches are connected to pin 2. There are three parameters that can be adjusted on this block. Xuan Liu. Target Scope: these two blocks are found from the xPC Target Library. To discover the precise structure of the system. Analog Input block.
School of Electrical and Computer Engineering Control Group • Out 1 & 2: these two blocks are crucial to collect numerical feedback information for precise analysis of the target system. Rex Lee. N. RMIT University School of Electrical and Computer Engineering Prof. 31 . Truong. Dr. Xuan Liu. Dae Yoo.V. Liuping Wang.
The data received from the two blocks will then be sent to the workspace. N. Xuan Liu. users are allowed to send their data collected from the above blocks to Workspace on Matlab. Dae Yoo. From the xPC Target Hierarchy.13 data on Workspace collected from Simulink ports As the above figures shown. Truong. Dr. and click on the “Send to Matlab Workspace” button. Liuping Wang. 32 . Rex Lee. click on the model that is currently used as the figure below shows. DC Motor Speed Control Lab From xPC Target Explorer.School of Electrical and Computer Engineering Control Group Chapter3.12 sending data from Simulink model to Matlab Workspace Fig3.V. Tick the time and output box. Fig3. where you can change the data file name. the data are sent to the Matlab RMIT University School of Electrical and Computer Engineering Prof.
Chapter3. AC Motor Control: the xPC Target System can also be deployed on AC motors. Rex Lee. In the xPC Target System design. State-space Control: as long as the system has been identified in the way as section 3. The system configuration part would be similar.V. However.School of Electrical and Computer Engineering Control Group Workspace. please check the pin assignment table to find a proper channel for position feedback. it is necessary to design a suitable control model in Simulink for AC motors. Xuan Liu. The appendix at the end of the manual recommends the block diagram for State-space control. Remote Control Lab: with a local router. Truong. Liuping Wang. State-space control can be employed in the system. 33 . respectively. Dr. The users who are good at Microsoft Visual Basic Express can use this program to design the GUI interface. Please refer to Mathworks website for the concrete method. The core for this way is to utilize xPC Target API and xPC Target API COM. Another approach is to complete the interface design in the Matlab environment and directly generate the GUI from Matlab. N. Please check Feedback MS150 system manual book to find out the proper connection for DC Motor Position Control. The two columns of “yout” correspond to the data from out1 and out2. RMIT University School of Electrical and Computer Engineering Prof. the xPC target and its host and be connected to internet. GUI Interface: a GUI interface for the Simulink models can be designed.5 Further Expansion Proposal Position Control: Feedback Servo System MS150 provides the potentio-meter unit OP150K and other units to collect positional feedback.4 described. A specific IP is required for the system in this case. DC Motor Speed Control Lab 3. which allows users could control it from distance. Dae Yoo.
“Counter/Timer Accessories and Cables” (for NI CB-68LP) [Online] Available: http://www.com/pdf/products/us/4daqsc202-204_ETC_212213. Dae Yoo. “Modular Servo Instructional Servo System. “Low-Cost E Series Multifunction DAQ – 12 or 16-Bit.com/pdf/products/us/4daqsc390-392.School of Electrical and Computer Engineering Control Group Reference  Feedback Instruments Ltd. 16 Analog Inputs” (for NI PCI E-series) [Online] Available: http://www. Truong.pdf  National Instruments.wikipedia.fbk.ni. N.V.org/wiki/PID_controller RMIT University School of Electrical and Computer Engineering Prof. 200 kS/s.pdf  Mathworks Inc. Xuan Liu. “PID controller” http://en.pdf  National Instruments.ni. “xPC Target Documents” http://www.com/access/helpdesk/help/toolbox/xpc/ ?BB=1  Wikipedia the free encyclopedia. Liuping Wang. 34 .com/files/MS150/Full%20MS150. MS150” [Online] Available: http://www. Dr. Rex Lee.mathworks.
System Identification. NI CB-68LP data sheet 4. Dae Yoo. Rex Lee. 68-Pin E Series Connector Pin Assignments RMIT University School of Electrical and Computer Engineering Prof.V. 35 . N.School of Electrical and Computer Engineering Control Group Appendix 1. PID Control and Statespace Control diagrams 2. Dr. Truong. Xuan Liu. Liuping Wang. GUI Interface 3.
36 . Liuping Wang. Dr. PID Control and State-space Control diagrams 1) System Identification 2) PID Control Design 3) State-space Control Design RMIT University School of Electrical and Computer Engineering Prof. Truong. Rex Lee.V. Xuan Liu. N.School of Electrical and Computer Engineering Control Group Appendix 1. Dae Yoo.
V. 37 . Xuan Liu. Dr.School of Electrical and Computer Engineering Control Group Appendix 2. GUI Interface RMIT University School of Electrical and Computer Engineering Prof. Liuping Wang. Rex Lee. N. Truong. Dae Yoo.