You are on page 1of 6

FAKULTI TEKNOLOGI KEJURUTERAAN

UNIVERSITI TEKNIKAL MALAYSIA MELAKA

CONTROL SYSTEM FUNDAMENTAL

BETR 2383 SEMESTER 1 SESSION 2017/2016

LAB 2 : MODELING AND SIMULATION OF MOTOR SPEED

GROUP SECTION:

DATE

1.
NAME OF GROUP MEMBERS
& 2.
MATRIX NUMBER

SITI NUR SUHAILA BINTI MIRIN


NAME OF INSTRUCTOR

EXIMINAR’S COMMENT VERIFICATION STAMP

TOTAL MARKS

Document Number Issue Number

N/A

Revision Number Total Page

1 (Hanif.Hasan) 6
2 (Wafi Aziz)

1
1.0 LEARNING OUTCOMES

Obtain the model of the Motor Speed, and compare to mathematical model from the class, as
well as with the real system.

2.1 EQUIPMENT

 Computer with Linux RTI operating system


 Multipurpose Control Engineering Plant Training Kit Hardware
 Multipurpose Control Engineering Plant Hardware Manual guide

3.1 PROCEDURE

Task 1: Acquire Open Loop System Response Of The Plant With Square Wave Input.

1. Open the model created from previous lab (Lab 1), and do the following changes.
a) Replace the sine block with Palette → Palettes → RTAI-Lib → Square, with
parameters are set as : Amplitude: 2, Period: 6, Impulse width: 3 and Bias : -1.
b) Remove the derivative block and used the transfer function as the speed derivation.
2. Remove the derivative block. The full model is as following figure:

3. Save the model as “Exp2_SysIdent_Matrix No.cos”


4. Under the Superblock diagram, go to Diagram → Rename, and set the superblock
diagram name same as the model name, which is “Exp2_SysIdent_Matrix No”.
5. Rebuild the system by clicking on the RTAI → RTAI CodeGen, and select on the
Superblock.
6. A popup message will shown, let the default setting and click ok.
7. If the code generation is successful, you would see the message “Created executable:
Exp2_SysIdent_Matrix No” message.
8. The executable file for the model has been generated, now goto the Terminal and login as
the su (type ‘sudo su’)), type the following command: ./Exp2_SysIdent_Matrix No
9. Click on the “qrtailab” icon on the desktop and launch the GUI for monitoring the signal.

2
10. Click on the Connect icon menu, and you should be connected to the model which is
running.
11. Click on the Scope icon menu, a dialog will pop up, set the following value for better
visualization:
a) Scope → Show/Hide : Checked
b) Scope → Display → sec/div : 1
c) Trace Options → offset/dy → Units/div: 5
12. You should see the encoder reading is in square wave form.
13. Now goto Scope → Saving and set the filename and the duration for saving data.
14. Use the name as “Exp2_Data_Matrix No”, and save for 30 seconds.
15. Click on Start and the recording will start.
16. Stop the execution after finish.

Task 2: Using System Identification Toolbox To Estimate The Model Of The Data

1. Extract the data from the exported structure of the scope by typing the following command
on the ScicosLab’s command window:
 Data = read('Exp2_Data_Matrix No',-1,3);
 t = Data(:,1);
 U = Data(:,2);
 Y = Data(:,3);
 plot(t, U, t, Y);

2. Launch the system identification GUI interface by entering sciIdent in the command
window. (if the GUI is not loaded yet, use the exec to load it).

3
3. In the GUI, set the following to match the previous command:
 Reference: U
 Output: Y
 Sampling: 0.001
 Order: 2
4. Click on Load Data button to import the data to System Identification tool.

5. Click the Identification button to get the model.

4
6. The Export button is to send the model in transfer function model to the workspace.
7. We obtain the model in s-domain and z-domain. We are going to use the s-domain for
analysis.
8. Write down the transfer function in s-domain.

Questions task 1 and task 2:

1. From the datasheet, the motor speed transfer function is given by:

363452.8
G( s)= 2
s +1562s+36216.303

Create a transfer function of the mathematic model and compare the step
response with the model from experiment. Do note that the amplifier gain is 2
(Use Matlab or Scilab to plot both transfer function in a single graph).

2. Give 2 reasons that caused the different between the mathematical model and
model from experiment.

Task 3: Comparing Model With Real Response

1. Open the model “Exp2_SysIdent_matrix No.cos” and rename it to


“Exp2_Simulation_Matrix No.cos”.
2. Under the Superblock diagram, go to Diagram Rename, and set the superblock
diagram name same as the model name, which is “Exp2_Simulation_Matrix No”.
3. Add another transfer function block and increase the Scope number inputs to 3 by adding
in the Name of trace to 1;2;3.
4. Key in the numerator and denominator based on the experiment results from previous
experiments.
5. Connect the output of Square wave block to the input of the transfer function block, and
connect the output of the transfer function block to the 3rd input of the Scope.
6. The complete model shown below:

5
7. Rebuild the system by clicking RTAI → RTAI CodeGen.
8. Launch “qrtailab” to monitor the signal and save the signal for plotting.
9. To save the data, click on the Scope icon menu, and go to Saving option:
Scope → Saving → FileName : Exp2_Data2_Matrix No
Scope → Saving → Time [s] : 30
Click on Start and the recording will start.

Questions Task 3:

1. What is the input for the system?


2. Compare the simulated signal and real signal, is the simulated signal follows the real
signals well?
3. Plot the graph from recorded data and sketch the graph generated from Scicoslab.
Note : To retrieve signals u may use below command
→ data = read('Exp2_Data2',-1,4);
→ t = data(:,1);
→ R = data(:,2);
→ sig = data(:,2:4);
→ plot(t,sig).

4.1 REPORT FORMAT

1. Use provided front page for your report (1st page of this lab sheet).
2. Report should be by handwritten except front page.
3. Contents of report :
a. Introduction - briefly state and explain lab objectives and what u have done on this
lab,
b. Result of each task - write appropriately. Support your documentation with
graph/diagram/figure/table (Draw by hand or printed).
c. Questions answer - answer all questions given.
d. Conclusion.
4. Total pages for report should not exceed 5 pages excluding picture/diagram.

You might also like