Contoh REPORT Open Ended CONTROL
Contoh REPORT Open Ended CONTROL
Contoh REPORT Open Ended CONTROL
EXPERIMENT TITTLE:
DESIGN OF CLOSE LOOP FUNCTION FOR MOTOR
INPUT VOLTAGE
Group Section 1
Time response of the system is defined as the output of a system when subjected to an input
which is a function of time. It also means subjected the control system to inputs that are functions
of time and studying their output which are also function of time. A control system generates an
output or response for given input. The input represents the desired response while the output is
actual response of system for example an elevator.
As defined earlier, time response is the response of control system as a function of time.
The time response analysis is divided into two parts. First is the output changing with respect to
time (transient response). Second is the output is almost constant (steady state response).
For time response analysis of control systems, we need to subject the system to various test
inputs. Test input signals are used for testing how well a system responds to known input. Some
of standards test signals that are used : Impulse, Step, Ramp, Parabola, Sinusoidal.
2.0 THEORY
Time response analysis of a system is mainly focus on the evaluation of the following parameters
Parameter Description
Rise time Rise time (tr) is the time required to reach the final value by an under
damped time response signal during its first cycle of oscillation. If the
signal is over damped, then rise time is counted as the time required by the
response to rise from 10% to 90% of its final value. (Time it takes for the
response to rise from 10% to 90% of the steady-state response.)
Settling time Settling time (ts) is the time required for a response to become steady. It is
defined as the time required by the response to reach and steady within
specified range of 2 % to 5 % of its final value. (Time it takes for the
error |y(t) - yfinal| between the response y(t) and the steady-state
response yfinal to fall to within 2% of yfinal.)
It is already defined that settling time of a response is that time after
which the response reaches to its steady-state condition with value above
nearly 98% of its final value. It is also observed that this duration is
approximately 4 times of time constant of a signal. At the time constant of a
second-order control system is 1/ζ ωn, the expiration of settling time can be
given as
Delay time Delay time (td) is the time required to reach at 50% of its final value by a
time response signal during its first cycle of oscillation.
Steady-state error Steady-state error (e ss ) is the difference between actual output and desired
output at the infinite range of time.
Undershoot A system that is over-damped will undershoot its target value. In other
words, an over-damped system has long rise and settling times and falls
short of the target value. Conversely, undershoot occurs when the
transition is from higher to lower, and its value is lower than the final
value.
Steady state error is the static error coefficient. The response that remain after the transient
response has died out is called steady state response. The steady state response is important to find
the accuracy of the output. The difference between the steady state response and desired response
give us the steady state error.
We further assume a viscous friction model, that is, that the friction torque is proportional to shaft
angular velocity.
Based on the above assumptions, we arrive at the following transfer function model of a DC motor
where the variable K represents both the motor torque constant and the back EMF constant (since
the two constants are equal when consistent units are employed).
An internal building encoder in motor is normally act as the sensor to read the rotational
displacement of motor drive shaft by using the concept of electronic pulse received per inner shaft
rotation. It consists of a combination of magnet and electric pulse receiver, where the current motor
shaft revolution count is predictable based on the number of pulse received. The prediction of
motor output RPM can be done by first convert the pulse received per second to the revolution per
second and then scale up to revolution per minute.
c.
The use of pulse width modulation to control a motor has the advantage to simulate a digital signal
to behave as analogue signal. The digital signal is switched on and off at very high rate (1k HZ for
Arduino Mega 2560 MCU). The input PWM value will represent the percentage of duty cycle
multiply by 255. As a result, the speed of motor driver drain gate will output the desired voltage
to motor based PWM signal created.
Regardless of the application, a closed loop motor control function is always the fundamental of
all the controllers and it have worked as shown in the diagram above. When a motor target data is
sent to the system, a controller will receive the signal and created Pulse Width Module (PWM) to
motor driver. The motor driver with build in L298 IC will supply the desired voltage to motor
through its drain pin. When the motor starts moving, and as it does, the encoder updates your
program with the motor’s current position. The program then re-evaluates the situation and tells
the controller a new duty cycle.
3.0 METHODOLOGY
3.1 Material and Apparatus
* List of components
No. Components Quantity
1 Arduino Mega 2560 Microcontroller 1
2 Cytron Dc geared motor with 1
encoder
3 L298N Dual channel motor driver 1
4 12V 2A DC power adaptor 1
5 Voltage sensor (0-25 V) 1
6 Jumper wires and breadboard 1
7 DC female power connector 1
2. Circuit connection
(The following software must be preinstalled with the listed toolbox add on and library)
Mathworks Mathlab
ii. Simulink
Arduino IDE
i. Adios library
Component Specification
Technical specification:
Microcontroller: ATmega2560
SRAM: 8KB
EEPROM: 4KB
Technical specification:
Suitable motor:
Technical specification:
Input Output
1. Set-up the apparatus as shown in Figure 3.2 and inspect the connection status for each of
the pins and connectors.
2. Connect the Arduino Mega 2560 MCU to computer through USB cable and launch the
Arduino IDE software.
3. Navigate to Tool and change the board type (Mega 2560) and port (COM) setting.
4. Browse the Adios.ino program file and upload the program. Do not disconnect the
interrupt the USB connection upon program upload completed.
5. Launch Matlab Software and activate Simulink APP.
6. Design a model as shown on the figure below and adjust the input PWM to 100.
7. Adjust the COM setup connection according to the current USM connection port and
click on the “RUN” button to execute the program.
8. Save the output Scopes data for normalization and analysis purpose.
9. Repeat the step 6 to 8 with input PWM at 150 and 250.
10. Repeat the step 6 to 9 for 2 more time for 3 set of complete RPM against Time data at 3
different PWM input signals.
11. Analyze the data based on the standard time respond analysis procedure and propose
suitable controller for the targeted system.
4.0 RESULTS
With the aid of Simulink software, the real time behavior of the selected DC brushless
motor was obtained in terms of the electronic pulse generated to trigger and control the motor
movement, motor input voltage generated by motor driver and the rotational speed (RPM) of
motor. The raw data for the 5 different motor speed were presented in Table 4.1 as shown below.
Table 4.1: Real time motor speed for 5 different input electric pulse (Results adapted from the
best trial)
0
50 PWM 100 PWM 150 PWM 200 PWM 250 PWM
Figure 5.1: The relationship between the PWM value to the motor input voltage.
In order to analyse the time response of the selected DC motor, all the graphs of real time speed
response of the motor were normalized with the closed fit plot function in the Simulink for data
normalization purpose. Table 5.2 shown the speed response curve of motor after normalization.
Table 5.1 The speed response curve of motor after normalization.
250 PWM
The normalized graph were analysed with the aid of 8 time response analysis elements. The
results of analysis were tabulated in Table 5.2 to 5.7.
50 PWM
No calculations
The speed response of motor at 50 pwm was unreadable. Based on the reference voltage
reading obtained, the mean voltage output from motor driver was 2.3V. The failure of motor
driver to supply power at the threadhold operating voltage value of motor caused the
electromagnetic force generated not sufficient to rotate the motor main shaft. Therefore, the
speed reading of motor was near to zero. Time response analysis can not be done on speed
response curve at 50 PWM.
Table 5.3 The time response analysis of DC motor at 100 PWM
100 PWM
Calculation:
a. Lag = 0.7s
b. Rise time = 2.3 – 1.2 = 1.1 second
c. Settling time = 4.8 – 0.7 = 4.1 second
d. Settling min = 19.8 rpm
e. Settling max = 22 rpm
f. % Overshoot = (22−20.5) × 100% = 7.31%
20.5
g. % Undershoot = (20.5−19.8) × 100% = 3.41%
20.5
h. Peak Time = 3.2 – 0.7 = 2.5 seconds
i. Peak = 22 rpm
The graph above indicated the motor started moved when 100 PWM of signal pulse supplied
to the motor driver and the internal rotary encoder started to read the revolution pulse of the
motor. Based on the result of time response analysis, the motor posted 7.31 % of overshoot,
3.41 % of undershoot and 2.5s of settling time when in service. This shown that the operating
condition of this motor was unstable, although at low speed.
Table 5.4 The time response analysis of DC motor at 150 PWM
150 PWM
Calculation:
a. Lag = 0.7s
b. Rise time = 2.1 – 1.2 = 0.8 second
c. Settling time = 9.5 – 0.7 = 8.8second
d. Settling min = 30 rpm
e. Settling max = 36 rpm
f. % Overshoot = (36−32) × 100% = 12.5%
32
g. % Undershoot = (32−30) × 100% = 6.25%
32
h. Peak Time = 7.6 – 0.9 = 6.9 seconds
i. Peak = 36 rpm
Figure above shown that when 150 PWM of electric signal was supplied, the motor speed
response was fluctuated about the targeted 32 rpm with the relatively smaller percentage of
overshoot (12.5%) and settling time(8.8s) when compared to the motor time response at 100
PWM.
Table 5.5 The time response analysis of DC motor at 200 PWM
200 PWM
Calculation:
a. Lag = 0.9s
b. Rise time = 2.34 – 1.10 = 1.24 second
c. Settling time = N/A
d. Settling min = 38 rpm
e. Settling max = 60 rpm
f. % Overshoot = (60−45) × 100% = 33.33%
45
g. % Undershoot = (45−38) × 100% = 15.56%
45
h. Peak Time = 13.4 – 0.9 = 12.5 seconds
i. Peak = 60 rpm
Figure above shown the time response behaviour of the selected DC motor system at 200 pwm
was posted peak value of percentage of overshoot (33.33%) and undershoot (15.56%). This
situation indicated that the DC motor started to be uncontrollable with the great amount of
errors. It might due to the inconsistent voltage and current supply to the motor, as the motor
was hard to maintain the targeted speed (45rpm) at the constant PWM signal supply.
Table 5.6 The time response analysis of DC motor at 250 PWM
250 PWM
Calculation:
a. Lag = 0.8s
b. Rise time = 2.5 – 1.1 = 1.4 second
c. Settling time = N/A
d. Settling min = 47 rpm
e. Settling max = 68 rpm
f. % Overshoot = (68−57) × 100% = 19.30%
57
g. % Undershoot = (57−47) × 100% = 17.54%
57
h. Peak Time = 13.7-0.8 = 13.1 seconds
i. Peak = 68 rpm
The figure above shown that the overshoot problem of the motor system caused the speed
response of motor fail to oscillate about the targeted speed (57 rpm). This indicated that the
system became uncontrollable when the speed approaching rating speed (at 255 PWM).
Table 4.7: Parameters of time response analysis for the selectec DC motor
Overall, the time response analysis based on motor speed experiment results indicated that
the motor system experience speed control errors problems, due to the existence of overshoot and
undershoot before achieved the targeted motor speed. Besides, most of the settling region of
the motor system also do not exist within the requirement of 5% for the targeted speed.
This analysis results proved that the application of controller was crucial for the motor
speed control purpose and the ideal controller would be PID controller. Through, the
implementation of PID controller into the system, the initial underdamped problem on the motor
system when supplied with 200 and 250 PWM respectively. The proportional gain (Kp) of the
controller would gain the amplitude of the initial peak oscillation for the system and allowed it to
response to a disturbance is steady oscillation and eliminate underdamped problem.
Next, the use of integral gain (Ki) to this system would increase the record of current error
values by sum up the existing detected errors. This would have magnified the errors existed and
allowed the control system to be more sensitive towards small amount of error.
Lastly, the application of derivation gains (Kd) to the system would increase the rate of
change of error for the system about the time. Where the frequency of response oscillation would
increase over the time with the increment of accumulated error. This ensured the consistent
fluctuation of the system always existed and fast reaction of the controller towards errors.
Compensation on the voltage supplied to the motor would be very reactive towards the existence
of accumulated errors.
Problems faced
Throughout the experiment, the problem of unstable voltage sensor readings was detected, the
sensor reading graph generated was fluctuated across 0V to the expected voltage as shown in
Figure 5.2.
Based on our study, the phenomenon was similar with almost all the sensor feedback system in the
world, in which the raw input signal data was always full with numerous of noises or undesired
interrupt signal which caused the desired result to be inaccurate or hard to be interpreted directly.
In this case, the input output voltage signal reading of motor driver to motor was unstable
fluctuating. There were several possibilities for the occurrence of this circumstances.
Firstly, the voltage input to both voltage sensor module and motor driver were unstable
when motor started to rotate. This problem was due to the type of power input used for this system.
The main power input for the electronic circuit was mainly rely on the AC-DC power adaptor with
a fixed current rating of 2A. The motor would have dominated the current supplied of power source,
when it started to rotate. The excessive draw of current by motor causes fluctuation of voltage
supply and lead to the fluctuation of voltage sensor reading. Besides, the noise generated due to the
electromagnetic wave of sensor signal cable would also interrupt the signal quality transmitted to
the sensor. The noise can be reduced by wounding a ground cable around the signal cable to
minimize the effect of electromagnetic wave interruption with grounding method.
6.0 CONCLUSION
In conclusion, based on the results of our time response analysis, we proposed suitable controller
to control the motor system is PID controller. PID is stand for proportional-integral-derivative. Through the
control of the three gain values (Kp, Ki, Kd), a PID controller would be able to balance all three-gains
impact to the whole system and may compromise the transient response, such as settling time, overshoots,
oscillations which are the motor system’s error.
When we were run the experiment, we were seen some of errors existed for the motor system to
achieve and maintain close to the targeted motor speed were huge
Based on the analysis and deduction made on the experiment results, there were several possibilities
that causes the unstable motor working condition. Firstly, the current supplied by DC power adaptor was
limited as due to the rating current of the device itself. Excessive current draw by the motor would cause
interruption on the voltage of the circuit Then, using of breadboard prototyping board and long jumper wire
might also cause the power to be unstable.
For recommendation, split power source of sensor and encoder from Arduino board or motor power
so the power supply to sensor will be more stable when motor is operating and use external rotational
encoder and connect externally to motor shaft instead of internal build in encoder. It may improve the
accuracy of encoder reading.
REFERENCE
2. Building a Simple Simulink Model. (2007). Basic MATLAB®, Simulink®, and Stateflow®,
209-242. doi:10.2514/5.9781600861628.0209.0242
3. Chołodowicz, E., & Orłowski, P. (2017). Low-cost air levitation laboratory stand using
MATLAB/Simulink and Arduino. Pomiary Automatyka Robotyka, 21(4), 33-39.
doi:10.14313/par_226/33
4. Create a Simple Model- MATLAB & Simulink. (n.d.). Retrieved from https://
www.mathworks.com/help/simulink/gs/create-a-simple-model.html
5. Four Quadrant DC Motor Speed Control Using Arduino. (2017). International Journal of
Modern Trends in Engineering & Research, 4(3), 119-123. doi:10.21884/
ijmter.2017.4091.r1g7s