Professional Documents
Culture Documents
GROUP SECTION:
DATE
1.
NAME OF GROUP MEMBERS
& 2.
MATRIX NUMBER
TOTAL MARKS
N/A
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
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:
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.
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.
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.
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. 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.