Lab 3: Measuring The Frequency Response of A DC Motor (Simulation)

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

Name: Ahmad Iqbal Bin Abd.

Latif Matrix Number: B010910149 Lab 3: Measuring the Frequency Response of a DC Motor (Simulation) Introduction

Course: BEKC Semester: 4/1

Frequency response is the quantitative measure of the output spectrum of a system or device in response to a stimulus, and is used to characterize the dynamics of the system. It is a measure of magnitude and phase of the output as a function of frequency, in comparison to the input. In the other words, if a sine wave is injected to a system at given frequency, a linear system will respond at that same frequency with a certain magnitude and phase angle relative to the input. For a linear system, if we doubled the amplitude of the input, the output will doubled too. Therefore, if the system is time-invariant, the frequency response also will not vary with time. Bode diagram or Bode plot is a graph of the transfer function of a linear, time-invariant system against frequency, plotted with a log-frequency axis, to show the systems frequency response. It is a combination of a Bode magnitude plot, expressing the magnitude of the frequency response gain, and a Bode phase plot, expressing the frequency response phase shift. So, for this experiment, we are measuring the frequency response of a DC motor and produce the Bode diagram of the system. Objectives 1) To measure the frequency response of a DC motor, and produce Bode diagram. 2) To obtain the transfer function that characterizes the dynamics of the DC motor using Bode diagram. Procedures Construct the bode plot for dynamic system using data from simulation. 1) First, generate the test system in MATLAB. 2) For each frequency listed in the first column of table 1, do the following: a) Generate a sine wave input with the given frequency. b) Simulate the response of the system. ( use model from exp 2) c) Examine the output, and determine the time and number of oscillations that transients take to die out.

Name: Ahmad Iqbal Bin Abd. Latif Matrix Number: B010910149

Course: BEKC Semester: 4/1

d) Compute the ratio of the output and input amplitude, and record this value in column 4. e) Convert the gain in column 4 to decibels. 3) Sketch the preliminary Bode diagram, and identify any regions that require more detailed testing and test additional frequencies in these regions. Results Table 1: Table for constructing a frequency response plot 0.01 0.03 0.1 0.3 1 3 10 30 100 Time 3140 1046.7 314 104.67 31.4 10.47 3.14 1.047 0.314 ncycles 5 5 5 5 5 5 5 5 5 Gain 6435.75 2145.22 643.31 214.00 62.79 18.32 3.44 0.54 0.057 Gain(db) 76.17 66.63 56.17 46.61 35.96 25.26 10.73 -5.35 -24.88

Discussion In this experiment, we need to determine the output response of the DC motor. From the given frequencies, we need to determine the output times and gains. Then, the gains value need to be change to decibel. When increase the frequency of the sine wave input, the time of the response become faster or smaller. The value of the ncycle is fixed by 5 for each frequency. Besides, the gain value also decrease or become smaller when increase the value of frequency. For frequency 0.01 and 100, the output wave cannot be seen clearly because every system has its own limitation. The output become too small and too large, so that, the desired value of the output, cannot be define clearly. The output wave also increase which mean, the peak value keep increasing starting from frequency 10. The peak value increasing from about 3.44 to 4.20 which mean, the peak value for each cycle is not the same. The figure for the response is shown in Appendix.

Name: Ahmad Iqbal Bin Abd. Latif Matrix Number: B010910149 Conclusion

Course: BEKC Semester: 4/1

As the conclusion, the best frequencies to use for this system are from 0.03 to 1. Other than that, the frequency only will make the system unstable which mean, the peak values are not constant. Besides, best frequency will give better Bode diagram of the system. For the system, the lower and higher frequencies will only make the system to have too bigger and smaller time response and makes us hard to define the actual values of the parameters.

Name: Ahmad Iqbal Bin Abd. Latif Matrix Number: B010910149 Appendix

Course: BEKC Semester: 4/1

Figure 1: Block diagram for the DC motor

Generate the test system (response via scope):

70 60 50 40 30 20 10 0 -10

200

400

600

800

1000

1200

1400

1600

1800

Figure 2: Frequency response for the test system

Name: Ahmad Iqbal Bin Abd. Latif Matrix Number: B010910149 Coding:
Gs=tf([1.8259e-2],[3.3781e-7 1.8483e-4 5.6730e-4 0]) w=0.01; ncycles=5; T=2*pi/w; tmax=ncycles*T; dt=1/w/20; t=[0:dt:tmax]; u=sin(w*t); [yout,tout]=lsim(Gs, u, t); plot(t,u,'b',tout,yout,'r'); legend('input','output',3); grid on;

Course: BEKC Semester: 4/1

7000 6000 5000 4000 3000 2000 1000 0 -1000

input output 0 500 1000 1500 2000 2500 3000 3500

Figure 3: Output response for =0.01

Name: Ahmad Iqbal Bin Abd. Latif Matrix Number: B010910149


2500

Course: BEKC Semester: 4/1

2000

1500

1000

500

0 input output -500 0 200 400 600 800 1000 1200

Figure 4: Output response for =0.03

700 600 500 400 300 200 100 0 -100

input output 0 50 100 150 200 250 300 350

Figure 5: Output response for =0.1

Name: Ahmad Iqbal Bin Abd. Latif Matrix Number: B010910149


250

Course: BEKC Semester: 4/1

200

150

100

50

0 input output -50 0 20 40 60 80 100 120

Figure 6: Output response for =0.3

70
5.5

60
5

50 40 30 20 10

4.5 4 3.5 3 2.5 2 1.5

0 -10

input output 0 5 10 15 20 25 30

1 30.4

input output 30.6 30.8 31 31.2 31.4 31.6 31.8 32

32.2

35

Figure 7: Output response for =1

Name: Ahmad Iqbal Bin Abd. Latif Matrix Number: B010910149


20

Course: BEKC Semester: 4/1


8

7
15

6
10

5
5

4
0

3
input output -5 0 2 4 6 8 10 12

input output 9 9.5 10 10.5 11 11.5

Figure 8: Output response for =3

3.15
5

3.1
4

3.05

2.95

2.9
1

2.85
0 input output -1 0 0.5 1 1.5 2 2.5 3 3.5

2.8

input output 3.04 3.06 3.08 3.1 3.12 3.14 3.16 3.18

Figure 9: Output response for =10

Name: Ahmad Iqbal Bin Abd. Latif Matrix Number: B010910149


1.5
1.1

Course: BEKC Semester: 4/1

1.05

0.5

0
1

-0.5 input output -1 0 0.2 0.4 0.6 0.8 1 1.2 1.4


input output 0.95 1.01 1.02 1.03 1.04 1.05 1.06

1.

Figure 10: Output response for =30

1 0.8 0.6 0.4 0.2 0 -0.2 -0.4 -0.6 -0.8 -1 input output 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35

0.26

0.24

0.22

0.2

0.18

0.16 input output 0.14

0.304 0.306 0.308 0.31 0.312 0.314 0.316 0.318 0

Figure 11: Output response for =100

You might also like