Controle Corrente e Rpm
Controle Corrente e Rpm
[Link]
ABSTRACT
An experimental investigation was conducted to control the speed of a permanent magnet brushed direct current
motor under cascade control approach. The investigation dealt with studying the performance of the motor under open
loop, current loop and speed loop conditions. The results then compared to similar investigations done by researchers. The
investigation was implemented on software and hardware models with the help of MATLAB Simulink, MPLAB software
and LabVIEW. PMDC motor mechanical and electrical characteristics were studied first, then they were implemented in
MATLAB Simulink. A cascade control model was designed in Simulink environment and linked with the motor via H-
Bridge simulation model. The cascade control has the following features, two Proportional Integral (PI) controllers, one for
speed loop and the other for current loop, Integrator windup feature and some limiters. The performance of the speed
control was studied successfully and motor speed was under control. The effect of tuning PI controller gains was observed.
Six important tasks were focused on in this project which are Unipolar PWM generation, speed and current measurements,
Integrator windup, speed transit and speed profile. The real time implementation was a success and some of the
measurements were compared with a simulation model. MPLAB software was used to write the codes in C language for
the cascade control loops.
Keywords: PMDC Motor, cascade control, LabVIEW, MATLAB simulink, encoder, tacho generator, Kp and Ki gains.
𝐾𝑝 𝑎𝑛𝑑 𝑘𝑖 values can be obtained and tuned particle swarm optimization, bode plot and trial and error
using different techniques such as Ziegler-Nichols, the [7][8].
1504
VOL. 15, NO. 14, JULY 2020 ISSN 1819-6608
ARPN Journal of Engineering and Applied Sciences
©2006-2020 Asian Research Publishing Network (ARPN). All rights reserved.
[Link]
By reviewing paper [9], H. Tun and W. Aung Mode A: Leg A switch reads 0 and Leg B switch
present a similar study on a 24 volt PM brushed DC reads 0, the subtract block will produce zero volt.
motor. In their study, they focused on a few features that a Mode B: Leg A switch reads 24 and Leg B
flexible inverter can provide in order to control the switch reads 0, the subtract block will produce 24 volt.
previous mentioned motor. In addition to that, they used Mode C: Leg A switch reads 24 and Leg B
the developed inverter to control brushless DC motor with switch reads 24, the subtract block will produce 0 volt.
PWM technique and three phase sine wave generator. Mode D: Leg A switch reads 24 and Leg B
They also mentioned controlling the motor with a PI switch reads 0, the subtract block will produce 24 volt.
controller to obtain suitable and steady responses of The RL-Load is a simple block contains a resistor
current and speed. However they did not focused on how and an inductor.
to present speed and current responses and the effect of
tuning the PI gains on them, as well as they never made 𝑑𝑖
𝑉 =𝑅∗𝑖+𝐿 (1)
𝑑𝑡
any actual speed profile, so that they demonstrate the
reliability of their work. Therefore, this paper take more
𝑑𝑖/𝑑𝑡 = (𝑉 − 𝑅 ∗ 𝑖)/𝐿 (2)
steps forward and demonstrates the actual effect of PI
gains on both PI controllers used in the outer and inner
Where:
loops of the cascade system.
V is the RL − Load input voltage
Section II shows the MATLAB simulation of
open loop. Whereas section III explains the cascaded R = 47 Ω, L = 3.3 mH,
control of dc motor. Then in section IV, MATLAB I = current passes through the resistor,
simulation of inner current loop and outer speed loop is di/dt = instantinous rate of current change (A/sec).
presented. After that in section V the real time
implementation of inner current loop and outer speed loop The voltage and current waveforms were
is [Link] finally in section VI. Speed measured at duty cycle equals to 50%, and they are shown
measurement, response and profile is illustrated. in Figure-2 below. For the same duty cycle, the open loop
was tested in real time with RL-Load. The RL-load is
2. MATLAB SIMULATION OF OPEN LOOP shown in Figure-3. The modulation index was adjusted
The H-bridge Leg A and Leg B can be using the potentiometer R22 to set the duty cycle at 50%.
represented in MATLAB Simulink as shown in Figure-1
below. The modulation index can be a constant number,
0.5 for example will give 50 % duty cycle. Each leg
contains carrier frequency of 10 KHz with a magnitude
Voltage
𝑇𝑖𝑚𝑒 (𝑚𝑠𝑒𝑐)
Figure-2. Voltage and current waveforms measured at 50%
duty cycle.
1505
VOL. 15, NO. 14, JULY 2020 ISSN 1819-6608
ARPN Journal of Engineering and Applied Sciences
©2006-2020 Asian Research Publishing Network (ARPN). All rights reserved.
[Link]
1506
VOL. 15, NO. 14, JULY 2020 ISSN 1819-6608
ARPN Journal of Engineering and Applied Sciences
©2006-2020 Asian Research Publishing Network (ARPN). All rights reserved.
[Link]
1507
VOL. 15, NO. 14, JULY 2020 ISSN 1819-6608
ARPN Journal of Engineering and Applied Sciences
©2006-2020 Asian Research Publishing Network (ARPN). All rights reserved.
[Link]
𝑑𝜔
𝐽 = 𝑇𝑒 − 𝑇𝐿 − 𝐵𝜔 (7)
𝑑𝑡
Figure-9. The full simulation of inner current loop.
Current
𝑇𝐿 = 𝑘𝑚 ∗ 𝜔^2 (6)
1508
VOL. 15, NO. 14, JULY 2020 ISSN 1819-6608
ARPN Journal of Engineering and Applied Sciences
©2006-2020 Asian Research Publishing Network (ARPN). All rights reserved.
[Link]
𝑘𝑝 𝑎𝑛𝑑 𝑘𝑖 were obtained using trial and error and they amount of current given. The aim of inner loop is to
were: control the amount of current that supplies the load. One
of the benefits that cascade control has is that the inner
𝑘𝑝 = 0.5 𝑎𝑛𝑑 𝑘𝑖 = 0.1. loop can be set up and tested first before the outer loop
being engaged.
With the current loop control, a demand current
was inserted in the code as a fixed value and the actual
current was measured using a current sensor. An error was
calculated by subtracting the actual current from the
demand and then inserted into the PI controller. The inner
current loop code has to be inserted within the void _ISR
_ADCInterrupt(void) which is the analog digital
conversion interrupt within this code, the 𝑘𝑝 𝑎𝑛𝑑 𝑘𝑖 were
defined as well as the demand current. The error was
calculated and inserted to the calculation of modulation
index which is the output of the current loop. The current
integrator was limited to prevent the integrator windup,
Figure-13. The outer speed loop simulation in MATLAB and the modulation index was also limited and then it was
Simulink used to produce Leg A and Leg B PWM pulses.
The current can be changed by inserting different
After setting the demand speed equal to 50, the values each time and running the program again. And with
output response of speed and current was obtained, shown DC motor load the direction of rotation can be changed by
in Figure-14 below, also shown is the effect of adding load adding a negative sign to the demand current value.
torque on speed and current response. Red responses are LabVIEW software was used to monitor the
the demand speed & current, while the yellow and green current in two ways, by digital display and indicator
are the actual. display. Figure-15 below shows the two types of display.
A further step was conducted to control the demand
current using LabVIEW instead of inserting it as a fixed
Current𝑇𝑖𝑚𝑒 (𝑠𝑒𝑐)𝑇𝑖𝑚𝑒 (𝑠𝑒𝑐)
on right.
Time (Sec)
Figure-14. Current and speed responses at demand speed
equal to 50.
1509
VOL. 15, NO. 14, JULY 2020 ISSN 1819-6608
ARPN Journal of Engineering and Applied Sciences
©2006-2020 Asian Research Publishing Network (ARPN). All rights reserved.
[Link]
program can understand, and the rest of the code does the Due to the parallel connection between the power
function of producing PWM pulses. With DC motor load, resistor and load machine, the equivalent resistor will be
the direction of rotation can be changed by the same low and hence the current becomes high when the
arrow, if it moves in the positive direction it produces magnitude of power resistor is reduced as shown in
positive current and if it moves in the negative it produces Figures (17) and (18) above. When the load torque (TL)
negative current and therefore it changes the direction. increased, the current increased and due to the fact that the
Drive On/ is a button used to enable LabVIEW control of mechanical equation of the motor contains (𝐵𝑤) which is
demand current. the friction multiplied by the speed, the speed goes down
A test was conducted to investigate the open loop to equalize the equation, taken into consideration that TE
behavior in real time implementation “from speed loop and J were constants, in equation (7).
point of view” with constant current demand. At this test
the machine was running open loop as there was no speed 𝑅1∗𝑅2
𝑅 𝑒𝑞𝑢𝑖𝑣𝑎𝑙𝑒𝑛𝑡 = (8)
𝑅1+𝑅2
control. A power resistor was connected with the load
machine after setting the test motor on a fixed demand
𝑉 =𝑖∗𝑅 (9)
current. This test was to see the effect of adding load
torque on the speed of the motor.
𝑇 = 𝑘𝑡𝜓 ∗ 𝑖 (10)
After applying different amounts of power
resistor to the motor the following curves of speed versus
B. Outer Speed Loop
resistor and current were gained in Figures (17) and (18)
The second feedback of the cascade control
below.
system is the speed feedback. It is called outer loop
because this loop contains the current loop (inner loop)
inside. The loop aim is to control the speed with PI
controller and thus to avoid speed drop when extra load
torque is being applied on the motor. The actual speed was
measured using an Encoder sensor attached to the motor
shaft. A demand speed was inserted in the C code, and an
error was calculated by subtracting the actual speed from
the demand speed. This error is inserted to PI controller
with 𝑘𝑝 𝑎𝑛𝑑 𝑘𝑖 gains and the output of the controller is the
demand current. Therefore, the demand current does not
need to be identified as a constant anymore nor inserted
via LabVIEW panel.
Speed integrator and demand current were both
limited to prevent windup. Note: the outer speed loop code
has to be inserted within thevoid _ISR
_ADCInterrupt(void) which is the analog digital
conversion interrupt.
Figure-17. Motor speed versus Current.
SPEED MEASUREMENT, RESPONSE AND
PROFILE
A. Speed Measurement
An encoder was used to measure the position and
speed of a motor shaft. This instrument has a glass disk
with 500 black marks etched on its surface. It also has a
light emitting diode (LED) and photosensitive transistor,
the LED produces light directed through the glass disk to a
transistor. As the black marks pass through the light beam,
pulses are produced by the transistor. Figure-19 shows one
encoder pulse and how the pulses are used to measure the
speed.
1510
VOL. 15, NO. 14, JULY 2020 ISSN 1819-6608
ARPN Journal of Engineering and Applied Sciences
©2006-2020 Asian Research Publishing Network (ARPN). All rights reserved.
[Link]
60
𝑆𝑝𝑒𝑒𝑑 𝑖𝑛 𝑅𝑃𝑀 = (14)
𝑟𝑝𝑚∗ 67.8∗10−9 ∗500
1511
VOL. 15, NO. 14, JULY 2020 ISSN 1819-6608
ARPN Journal of Engineering and Applied Sciences
©2006-2020 Asian Research Publishing Network (ARPN). All rights reserved.
[Link]
A power resistor was attached to the load 0.001and the tacho voltage reading was 4.77 volts before
machine to help modifying speed response characteristics connecting the power resistor and became 5.63 at the
such as overshoot and settling time. The power resistor instant of connecting, then settling at 4.77 volts after a
was connected in parallel with the load so as to reduce the small period of time. The overshoot percentage was
equivalent resistor and thus increase the current according calculated as follow:
to ohms low. Figure-23 shows how the power resistor was
connected with the test rig. 𝑀𝑃𝑡 −𝑓𝑣
𝑃𝑂 = ∗ 100% (15)
𝑓𝑣
5.1 − 4.77
OverShoot = ∗ 100%
4.77
Overshoot = 7%
C. Speed Profile
For more advanced applications speed needs to
be changed repeatedly within a specific time period. With
such speed control a specific speed profile can be done
easily and via the tachogenerator the speed profile can be
monitored. C code was used to produce two different
speeds 500 and 2000 RPM within two directions of
Figure-24. Speed transient response during the 5 second rotation for a 6 second time period, after the 6 seconds
period with 𝑘𝑝 = 2.114 𝑎𝑛𝑑 ki = 0.001 ends the counter resets and starts again.
When the power was switched on the motor was
It is clear from the figure that the speed response spinning in clockwise direction with 500 RPM, after one
was effected during the plugging in and out of the resistor. second the speed increased to 2000 RPM and after another
The PI gains at this test were 𝑘𝑝 = 2.114 𝑎𝑛𝑑 𝑘𝑖 = second the speed reduced to 500 RPM, then it changed the
1512
VOL. 15, NO. 14, JULY 2020 ISSN 1819-6608
ARPN Journal of Engineering and Applied Sciences
©2006-2020 Asian Research Publishing Network (ARPN). All rights reserved.
[Link]
direction and so on. Figure-26 below shows the speed [2] A. S. A. Elhamid. 2012. Cascade Control System of
profile which was recorded by an oscilloscope via Direct Current Motor. World Applied Sciences
measuring tachogenerator voltage. Journal. 18(12): 1680-1688.
1513
VOL. 15, NO. 14, JULY 2020 ISSN 1819-6608
ARPN Journal of Engineering and Applied Sciences
©2006-2020 Asian Research Publishing Network (ARPN). All rights reserved.
[Link]
1514