You are on page 1of 5

ENGEN 352

Laboratory 3 – Report
Mac Hildebrand – 1617999
May 5, 2022
Procedure and Findings:
To begin, the motor was run at 50% capacity for 2 seconds (blue line). An average was
taken for the last 20 data points for an approximated value for A, being A = 89.22 RPM.
Using this, the First Order System could be determined for Simulink.

A
G(s)= where y ( τ )=0.632 A=0.632 ( 89.22 )=56.38
τs+ 1
Using linear interpolation, we can determine τ to be 0.1843 seconds.

89.22 /50
This gives the FOS G(s)= represented by the green line.
0.1843 s +1
120

100
87.22
80
Rotations (RPM)

60
Motor 50% at 100hz
56.39
τ
40 FOS Simulink

20

0
0 τ 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Time (s)

Figure 1

It can be noted that the actual motor drags behind the theoretical line. This can be
attributed to motor friction, heat and imperfect circuitry as well as the motor trying to
adjust its speed so frequently (see the small peaks and valleys in figure 1.) If the motor
is not sufficiently warm before it is used it may also not go fast enough. The motors also
vary between each specific motor and encoder.

Once the FOS has been found, the system can have a large enough gain to cause it to
oscillate consistently as shown in figure 2, a Simulink scope with a gain of 40 applied.
Figure 2

Using the small peaks of the oscillations we can determine Pcr (Critical Period) to be Pcr = 0.02061s,
and Kcr = Kp = 40. Using these, we can get a Zeigler-Nichols tuning with Kp = 18 and Ti = 0.01718 which
gives the model shown in Figure 3. The target rotational velocity is 100 RPM.

160

140

120
Rotations (RPM)

100

80
Z-N Tuned Simulink
60 PI Controlled Motor
40

20

0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Time (s)

Figure 3

This shows the Simulink model having a large initial peak and much smaller secondary one
(characteristic of the Zeigler-Nichols tuning.) The The motor is not able to follow this very closely and
oscillates around the steady state level, again slightly lagging due to real motor characteristics (drag,
friction, electrical losses, etc.) This lag may also be due to the motor not being able to produce
higher speeds. It is noteworthy that the motor does not drop speed during the valley of the Simulink
model as would be expected.

The values for Kp and Ti can be adjusted until Figure 4 is reached, showing the ideal quick rise and
consistent speed shown in the Simulink model. Kp = 14, Ti = 1.6.
120

100

80
Rotations (RPM)

60
Optimised Simulink
40 Optimised Motor

20

0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Time (s)

Figure 4

Using these optimized values for Kp and Ti, the Simulink model shows a quick rise time and no
overshoot. The motor and PWM controller do it’s best to follow this line. The model could be
followed more closely (or at least more smoothly) if the sampling rate was a higher frequency. All
the motor graphs are taken at 100hz. This increase would however come at a cost of computational
power. For such low frequency value, there would not be any significant issues, however it is good to
keep in mind.

Again, using a Kp = 40 as a simple gain, the motor position system can be observed with a step input
of 5 rotations as seen in figure 5.

4
Rotations (RPM)

3
Position Motor
2 Position Simulink

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Time (s)

Figure 5
Trying to optimize this graph shows that very little changes. This is assumed to be due to the fact
that while the Simulink model may call for a faster increase in rotations, the motor is physically
limited in its rotational speed, meaning it cannot decrease the rise time outside of start and stop
acceleration.
6

4
Rotations (RPM)

3
Optimised Position Simulink
2 Optimised Position Motor

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Time (s)

Figure 6

It should be noted in figure 6 that there is some overshoot of the motor over the Simulink model.
This could be attributed to fine errors in the encoder, in turn meaning the motor does not know
exactly where it is. This could also be the motor over accelerating at the begin of it’s rotations which
it does not attempt to recover until it reaches the determined number of rotations.

You might also like