Design and Development of Cascaded Current Control in DC Motor Variable Speed Drive using dSPACE

Even today, DC motors are still used in variety of applications, including home appliances, transportation, as well as industrial crane and rolling machine. However, achieving precise speed and torque control in DC drives at industry level could be challenging, as instability and reduced efficiency remains at large. This project focuses on developing a cascaded control system for a Separately Excited Brushed DC motor using dSPACE platform. The cascaded control system, designed using MATLAB Simulink, incorporates a proportional-integral (PI) controller at the speed loop and a Hysteresis controller at the current loop to improve robustness and dynamic performance. The experimental setup utilizes the dSPACE 1104 platform, an asymmetric bridge converter board, gate driver, and electrical load. Speed measurement is done using an incremental encoder, while current is measured using the ACS712 current sensor. The drive system was tested in alternate low and high speed cycle on various load level to test for stability, robustness and dynamic performance. The proposed control system was compared with PI-closed-loop control and open-loop control determine the best drive performance. Experimental results showed significant improvement in term of transient response and ripple reduction of speed and current for proposed cascaded current control over the closed-loop design.


Introduction
In industry, cost effective solution is imperative.Motor parameters such as speed, torque, and position at can be controlled effectively using variable speed drives.Widely used in industry to drive conveyors, centrifuges and pumps, variable speed drive provides superior efficiency and substantial cost reduction than the conventional constant speed drive combined with mechanical component (such as throttle valve or damper) [1].DC motor, known for its simplicity and ease of control was among the earliest type of motor invented.Back then in 1832, invention of commutator by William Ritchie and Hippolyte Pixii laid foundation to development of dynamometer which was the technology behind the DC motor [2].
Nowadays DC motor is used in many industries particularly in low power range: automotives, electronic applications, healthcare, and many more.
The PI controller is widely used in closed-loop speed control systems of motors, pumps, fans, and other mechanical systems in industrial applications.Regarding modifications in the speed reference and torque disturbance, the closed-loop speed control exhibits strong dynamic performance [3], [4].In [5], the proposed PI control approach can produce a better response in terms of flux, torque, and speed control for different speed commands, load disturbances, and parameter uncertainties.However, like any control system, care must be taken to tune the controller gains properly to avoid instability and other problems.
Limitations of single speed-loop control may be mitigated by adding extra control loop at the current control part.The combination of speed and current loop control is also known as cascaded current control.The cascade controller enhances the system's adaptability, rapidity, and anti-jamming capacity.This system is effective against the disturbance entering the actuator or the secondary process.Reducing the system's time constant is an added advantage of the cascaded close system.This makes the cascaded system the best tool for managing speed, armature current, and torque.In a cascaded control design [6], the proposed current controller performs better in terms of the overshoot and its ability to perform within the desired window for the given switching frequency of the converter.Furthermore, the speed of response is ideal for high performance applications.In another cascaded control design, Genetic-Algorithm was used to tune a PID Controller.The output controller is used to control the final control element which generates the variables that are directly influenced by the secondary process.Sub sequentially, the variables produced by the secondary process exerted the effort on the primary process and improved system stability [7], [8].
Real-time implementation of cascaded control of motor drive requires a high-performance computing platform due to complexity of algorithm.dSPACE 1104 with a DSP chipset has been widely used in motor control design [9] due to seamless integration with MATLAB/SIMULINK and rapid prototyping capability.The design of the cascade current control, its implementation in MATLAB/SIMULINK and dSPACE 1104 in real-time, and a comparison of the cascade current control and PID control are all covered in the following section.

Separately excited Brushed DC Motor
In DC motor, the current in the armature is powered by DC source and is connected through commutator and brush.At the armature, the conductor carrying the current is surrounded by magnetic field and thus will experience torque that causes it to rotate.DC motor can be classified according to how magnetic field is generated: either from permanent magnet at the stator and hence called as Permanent Magnet DC (PMDC) motor or through excitation at stator field winding.
A separately excited DC motor is a type of DC motor in which the field winding is supplied with direct current from a separate source, rather than being supplied by the same current that flows through the armature winding.This allows for more precise control of the motor's speed and torque, as the field current can be varied independently of the armature current.Additionally, it is less affected by changes in load and voltage as compared to other types of DC motors like series and shunt wound DC motors [10].Due to its precise speed control, adjustable torque, excellent dependability, and simplicity, the separately excited DC motor has long been considered the most suited arrangement for variable speed applications [11].
Equivalent circuit of separately excited DC motor shown in Figure 1[12] consist of armature and field circuit where each circuit is separately supply from power sources: armature voltage,   and field supply voltage,   .On the armature side, circuit parameter is described as follows: Where,   is armature current,   is armature resistance,   is armature inductance,   is back-emf constant and   rotor speed.Term     is back-emf component and is speed-dependent.When current flows in the armature winding surrounded within flux field, the rotor will generate torque to start rotation.Consequently, back EMF is produced in proportional to rotating speed.Net rotor current will generate net torque to keep motor rotation at determined speed.
On the field side, circuit parameter is described as follows: Where,   field resistance,   field inductance, and   field current.Field current produces flux through the field winding.The field current is unaffected by changes in the armature current, leading to stable and constant magnetic flux.Typically, the field current,   is significantly smaller than the armature current,   [12].
For direct-drive motor-load system, equation of motion is described by: Where,   is required electromagnetic torque,   =   +   and   =   +   respectively are equivalent moment of inertia and equivalent damping coefficient which accounts for both motor and load,    is required acceleration and,   is load torque.When motor is coupled to the load, motor must generate torque equal to the load torque to enable uniform rotational speed.
Developed electromagnetic torque   at the motor, is proportional to armature current for a constant flux in air gap and considering fixed field in separate excitation: Where,   is torque constant.Therefore, controlling armature current will control torque.

Asymmetric Bridge Converter
An asymmetric bridge converter is a type of DC-DC converter that uses a bridge circuit configuration in which the switches are operated asymmetrically.They are particularly useful in applications where the input voltage can vary widely, such as in renewable energy systems and battery-powered devices.
These converters are known for their high efficiency, wide input voltage range, and ability to handle high power levels.

Figure 2. Asymmetric Converter (one phase) [13]
Figure 2 shows a topology of one phase asymmetric converter.The converter is widely used with Switched Reluctance Motor (SRM) that operates on three, four or five phases depending on the motor type.Apparently for this topology, identical topology is cascaded to the converter depending on the number of phases to be operated.Two switches are present in each phase so that each SRM phase can be operated independently [13].An asymmetric converter has three operating modes that supply a different voltage level across each phase of the machine.By controlling the state of the two switches in each phase leg, it is possible to generate three voltage levels: +VDC, -VDC, and zero voltage to the phase.To drive the DC motor, only one phase of the circuit is operated by switching the two transistors in the phase.However, the output phase current is unipolar, thus allowing only one direction control for the DC motor [14].

Speed Control Loop
A speed control system loop is a mechanism utilized to regulate the operation speed of a machine or process.It comprises of three key components: a sensor for measuring the current speed, a controller for analysing the sensor data and determining the necessary adjustments, and an actuator for implementing those adjustments.The control loop is continuously closed by feeding the output of the actuator back to the sensor as input for the next cycle of the control process [15].
Among prominent controller used in speed loop is proportional-integral (PI) controller.The proportional control mode helps to quickly bring the speed to the desired value by applying a control action proportional to the error.This control action is determined by the proportional gain (Kp) of the controller.The larger the proportional gain, the larger the control action will be for a given error.The proportional control mode helps to reduce the error quickly and bring the system close to the desired speed.The integral control mode helps to eliminate any residual error by continuously summing the error over time and applying a control action proportional to this accumulated error.This control action is determined by the integral gain (Ki) of the controller.The integral control mode helps to eliminate any steady-state error and brings the system to the desired speed [16].

Current Control Loop
A current control system loop is a mechanism that monitors and regulates the flow of current in an electrical circuit or system.It uses a sensor to measure the current, a controller to analyze the sensor data and determine the necessary adjustments, and an actuator to implement those adjustments.The actuator, which can be a power electronic switch, alters the resistance in the circuit to adjust the current flow.The control loop is closed by feeding the output of the actuator back to the sensor as input for the next iteration of the control process.The motor voltage source is changed into the current source by the inner current loop, which has greater benefits from a dynamical standpoint since the motor dynamics are controlled by the current controller as its primary function.The objective of the current control system loop is to maintain the desired level of current within the circuit and to eliminate disruptions in output by adjusting the actuator based on current measurements [17].
A hysteresis controller is a type of feedback control system that is used to control the current in a circuit.The controller compares the current in the circuit to a set point and adjusts the control signal to maintain the desired current level within a defined "hysteresis band" around the set point.The hysteresis band is a range of values above and below the set point within which the current is allowed to fluctuate before the controller takes action to bring it back to the set point.This type of controller is often used in applications where there is significant noise or variability in the current.The hysteresis band helps to filter out the noise and prevent hunting, which is the oscillation of the control signal around the set point.Hysteresis controllers are simple to design, easy to implement, and have good dynamic performance, they are also robust to parameter variations and disturbances.

Cascaded Control System
The inner loop determines the set point armature current in relation to the speed while the outer loop controls the armature current set point and the speed.Therefore, the motor and driver circuit are protected from the high input surge current by providing current limitation [18].
The inner loop consists of a DC/DC converter that manages the constant power change and armature current.It helps to limit the outer loop by preventing armature over the current condition.The cascaded controller system has primary (outer) and a secondary loop (inner).The inner loop is tuned first, subsequently the outer loop of speed involved [17].In typical cascaded control scheme in Figure 3, the primary (outer) loop consists of a speed controller while the secondary loop has a current controller and DC/DC converter.It has two feedback loops, two controllers, two sensors, one actuator, and two processes in series.The primary controller known as the master controller sets the parameter for the secondary controller referred to as the slave controller.The primary loop detects the speed via the speed sensor and sends the signal to the speed controller.The speed controller is self-tuned using certain tuning rules by taking into account the influence of the controlled primary loop, current sensor will send signals to the current controller in a secondary loop, detecting current through a current sensor, and directing it to the actuator.This method is more effective to control an unstable system than a single-loop method.
The primary function of the current controller is to master motor dynamics.As in dynamics viewpoint cascaded control system is an additional benefit as the inner loop converts motor voltage signals to current signals.Moreover, it helps to limit the torque when a sudden load change or start-up drive protection.The design, synthesis, and parameters of the control system can be gradually adjusted from the lowest to the highest settings [17].Figure 4 illustrates the block diagram of experimental configuration of the cascaded control system while Figure 5 illustrates the experimental setup of cascaded control utilizing PI control and hysteresis control for a separately excited DC motor.It showcases the circuit connections of the hardware on the dSPACE 1104 platform, including a separately excited brushed DC motor with an incremental encoder attached, an asymmetric bridge converter, a gate driver, an ACS712 current sensor, and loads.The motor-load setup involved a separately excited brushed DC motor with a power rating of 185W, connected to a DC generator.The DC generator was further connected to multiple bulbs, each rated at 60W, to simulate different level of load situation for the system.Parameters of the motor-load is  1.A variable DC power supply was employed to supply armature voltage while separate 240V excitation supply was used to power the field winding.Table 2 tabulates main circuit components of single-phase asymmetric bridge converter prototype board.It employs two switches per phase configuration.The power MOSFET used as switch in the converter can handle up to 400V of voltage, while the switching diode can handle maximum current of 60A.To stabilize DC bus power, a DC link capacitor with a capacitance of 1000uF and a voltage rating of 200V is used.Additionally, 3A fuse acts as circuit overcurrent protection element.Although voltage rating for the MOSFET is 400V, the capacitor rated voltage is 200V, thus the operational bias voltage is limited to 120V to ensure safe and efficient operation.

Hardware Components
A SICK incremental encoder with resolution of 2000pulse per rotation (ppr) is used to measure the rotational speed of the motor.The encoder's readings are then fed back to the controller board, providing data for speed control loop.Additionally, an ACS712 current sensor is employed to measure the current flowing through the system for current loop control.MATLAB Simulink blocks through Simulink real-time interface (RTI) were utilized to develop control algorithm for the experimental setup hardware on the dSPACE platform.Figure 6 displays the Simulink RTI program block for the proposed cascaded control system.For performance comparison, the system was also tested using open loop and closed-loop speed control algorithm.
The dSPACE Control Desk is used together with Simulink RTI program for system control under platform dSPACE 1104.The Control Desk provides real-time data visualization interface as well as real-time control.Figure 7 shows the dashboard system that has been developed to monitor the measured speed and current value for the cascaded control system.

Results & Discussion
This section discusses the experimental results of the project using the dSPACE 1104 platform.Three types of system were developed: open loop, closed-loop and cascaded closed-loop where the speed command is varied alternately between low (200RPM) and high (600RPM) at varying load from zero to three bulb loads.Slave PWM was used to generate PWM signal at switching frequency 1kHz.

Result of Open-Loop System
In Figure 8, deploying open loop control algorithm system at one bulb load, PWM was varied to see the speed and current response during low (0.3) and high (0.8) duty cycle.As expected, at low duty cycle speed RPM was between 215 and 220 while the current value ranged from 0.02A to 0.09A.At high duty cycle, speed was between 592 to 599R and current between 0.192 and 0.23A.The motor speed tracked the PWM duty cycle well with low ripple of 1.75%.However, the current ripple was high.As the load increased to three bulbs, the speed ripple maintained below 2% at 1.85% and the current ripple have reduced to within 50%.However, due to heavier load, the speed has dropped by 9.97% on average.

Result of Closed Loop System
Figure 9 shows closed-loop system at one load running with reference speed set alternately between low speed at 200RPM and high speed at 600RPM.Low speed response was between 200 to 220RPM while current response at 0.01 to 0.15A.High speed response was between 595 to 605RPM while current value ranged from 0.13 to 0.25A.It is observed during low-speed cycle, both speed and current ripple was higher.However, as the load increased to three bulbs, the speed ripple slightly reduced to 4.75% while current ripple has reduced to seven times lower.Steady-state error (SSE) slightly increased by 4%, mostly contributed during low-speed cycle with no speed drop observed during this interval.From the figure, it can also be observed that the transient time is faster than the open-loop.

Result of cascaded closed-loop system
Figure 10 shows cascaded closed-loop system at one load running with reference speed set alternately between low speed at 200RPM and high speed at 600RPM.Low speed response was between 210 to 223RPM while current response at 0.02 to 0.12A.High speed response was between 600 to 605RPM while current value ranged from 0.16 to 0.26A.It is observed during low-speed cycle, both speed and current ripple was higher.However, as the load increased to three bulbs, the speed ripple slightly increased to 3.75% while current ripple has reduced to more than eight times lower.Steady-state error (SSE) reduced to below 1%, with slight speed drop at 1.25%.From the figure, it can also be observed that the transient time is faster than the closed-loop.Open Loop system lacks feedback, simply applying the input voltage directly to the motor without considering the actual motor speed.From the result, the Open Loop system demonstrates significant speed variations for all loads.It struggles to consistently maintain the desired reference speed range, as the RPM values fluctuate considerably.
Closed Loop system incorporates feedback by employing a speed sensor to measure the actual motor speed and comparing it with the desired reference speed.Closed Loop system performs better than the Open Loop system.The RPM values generally lie closer to the desired reference speed range for all loads.However, some variations are still present, particularly for higher loads.
To further enhance control accuracy, the Cascade Closed Loop system enhances the Closed Loop system by incorporating an extra control loop using an ACS712 current sensor.This additional loop operates with hysteresis control.From the result above, the Cascade Closed Loop system exhibits the most consistent performance among the three control loop systems.The RPM values for all loads remain within or very close to the desired reference speed range.
In summary, based on the experimental results of the Open Loop system, Closed Loop system, and Cascade Closed Loop systems tested with varying load levels, it can be concluded that the Cascade Closed Loop system offers the highest level of accuracy and consistency.It exhibits minimal current ripple, a good response transient, and effectively tracks the reference speed.

Conclusion
In conclusion, the project has successfully accomplished its goals, resulting in significant advancements in the Cascaded Current Control of a DC motor.Through the design and development process, a cascade closed-loop system was created, incorporating PI control for the speed loop and hysteresis control for the current loop.This implementation has notably improved the accuracy, stability, and responsiveness of the motor's speed and current control.
The validation of the design and performance parameters was conducted through extensive experimental testing on the dSPACE 1104 platform.The experimental results particularly at transient response and also speed and current ripple supersedes closed-loop control.

Figure 1 .
Figure 1.Schematic Diagram of a Separately Excited DC motor[12]

Figure 3 .
Figure 3. Block Diagram of speed cascade control for DC motor[17]

Figure 4 .Figure 5 .
Figure 4. Block diagram of cascaded current speed control of DC Motor using PI and Hysteresis Controller

Figure 7 .
Figure 7. dSPACE Control Desk Dashboard system of experimental setup

Figure 8 .
Figure 8. Speed and current response Open Loop system with one load

Figure 9 .
Figure 9. Speed and current response of Closed Loop system with one load

Figure 10 .
Figure 10.Speed and current response of Cascaded Loop system with one load

Table 1 .
Parameters of Separately Excited DC Motor.

Table 2 .
Parameters of Asymmetric Bridge Converter.
3.2.Real-time control implementationFigure 6. Simulink RTI block program of cascade closed loop system for the experimental setup

Table 3 .
Summary of experimental result performance parameter comparison between cascadedcontrol, closed-loop, and open-loop design