Review Safety considerations when working in power electronics before proceeding.
There are three major components of the Workbench-based electric-drives system that will be used to perform all the experiments in this course. They are as follows:
Three-inverter power module with an onboard controller and data logger.
Coupled motor-generator system.
Workbench simulation and rapid prototyping software platform.
In this experiment, a prebuilt DC motor speed-control model will be simulated and run in real time as an introduction to all the components mentioned above. The following section gives a brief overview of the various components that will be used to run the DC motor speed-control model. This will be followed by a simulation of the system in Workbench and a real-time run using the inverter-motor drive platform.
The overall system is shown below and consists of the following components:

Workbench software platform: A numerical simulation platform that supports both model-based and code-based design. The toolbox within the platform consists of various prebuilt, commonly used arithmetic, logical, conditional, and storage operators that can be used to model complex systems by simply dragging, dropping, and interconnecting these tools. In addition to simulating a system, the platform can generate digital-controller-specific code that can be programmed into a microcontroller or digital signal processor to perform real-time control.
Isolated DC power supply: This is used to power the inverter DC bus. In normal operation, the system is always run as a motor-generator pair, in which energy transferred to the motor is mostly recuperated by the generator. Thus, the DC power supply only needs to supply the losses and the initial charging current.
NoteThe communication channel between the computer and the three-inverter module is not isolated. Hence, the DC power supply must be isolated to avoid common-mode current, which could otherwise potentially destroy the whole system.
USB A-B COM channel: Code and data transfer occur via USB 2.0. Under ideal conditions, the maximum data-transfer rate is 480 kbps, which translates to 15,000 samples per second for real-world variables such as motor currents, voltages, and speed.
Three 3Φ inverters: The hardware module contains all the power electronics, gate drivers, current and voltage sensors, digital signal processor, data logger, and programmer necessary for the design and deployment of common real-time motor-control algorithms. There are three 3Φ inverters, each rated at 50 V and 7 A. Forced cooling using two frame-mounted fans allows each inverter to be switched safely at up to 50 kHz under rated conditions. Each inverter is independently controlled by the onboard TI TMS320F28335 digital signal processor (DSP).
In addition to providing PWM control of the inverters, the DSP reads feedback signals from the phase-A and phase-C current sensors of each 3Φ inverter, the DC bus voltage sensor, the inverter overcurrent and overtemperature faults, and the motor-position encoder. The measured data, as well as other model variables, can be logged and viewed in real time on the Workbench software platform. This is made possible by a dedicated onboard data-transfer link between the computer and the DSP. The same channel is also used to transfer programs from the computer to the DSP.
DC motor: The DC motor is rated at 36 V and 4 A continuous, with a no-load speed of 4000 RPM. In this experiment, the speed of this motor is maintained at a constant 100 rad/s, regardless of load changes.
DC generator: The DC generator is rated at 60 V and 4 A continuous, with a no-load speed of 4700 RPM. It has an encoder mounted at the rear end of the rotor shaft to measure the speed. Since the motor and generator are coupled, the magnitude of the generator's rotational speed is the same as that of the motor. The generator is used to emulate load changes.
Motor-generator coupler: The motor and generator are tightly coupled using an Oldham coupler. The coupling shaft is surrounded by a safety enclosure with viewing slots.
WarningDo not leave any loose objects lying around as they can get pulled into the motor shaft while rotating and could be flung around at dangerously high speed. Always view from a safe distance.
DSUB-15 encoder feedback: The motor/generator speed is measured using a 2048-line magnetic rotary A-quad-B encoder attached to the generator. This encoder contains 2048 evenly spaced, alternating north-south poles on a disc mounted on the rotor shaft. Two Hall-effect sensors are fixed to the motor frame. As the rotor rotates, the alternating magnetic polarity generates voltage pulses at the outputs of the Hall-effect sensors. Counting the number of pulses per second gives the rotor speed. The sensors are positioned so that the generated pulses are phase-shifted by 90°. The direction of rotation is obtained from the polarity of the phase shift between the two signals.
Copy the folder containing the prebuilt example project for this experiment, usually located at C:\Program Files (x86)\Sciamble\WorkBench v1\Examples\CUSPLab\BasicDrives\Experiment1, and paste it into a location where the user has permission to edit and save files, such as the Desktop folder.
Click the
icon on the desktop to launch the application.
Workbench has tabs on the left, right, and bottom that represent docked windows, each of which displays information or provides controls to the user.

Clicking these tabs reveals their respective docked windows. The content within these docks changes based on the context, as will be seen later.
Click the Toolbox tab in the left tab section and pin the window by clicking the
icon in the top-right corner. Similarly, pin the Explorer dock on the right.
The tools in the Toolbox are grouped into categories based on their operation. Click the drop-down list
to navigate between the tool classes.
Click the
icon in the Toolbox dock to hide the toolbox for now.
The Explorer/Solution Explorer dock acts both as a file browser for navigating to, opening, adding, or removing files from a project and as a container that displays the project structure.
The toolbar within the Explorer dock,
, consists of the following buttons:
: Creates a new project.
: Opens an existing project.
: Creates a new model or script file and adds it to the selected project.
: Adds an existing model or script file to the selected project.
: Removes the selected project, model, or script file. This does not delete it from the physical folder; it simply removes it from the current project.
: Sends the selected model or script file to the Recycle Bin.
: Downloads project files.
Click the second icon,
, to open an example project. This opens the file browser within the Explorer dock.
Navigate to the folder where the prebuilt example project was pasted in Step 1. Double-click the DCMotorSpeedControl.project node within that folder to open the project.

Click the
icon to explore the files within the project.
To display the model file, double-click the
DCMotor node in the Explorer dock.

Run the model by clicking the
button in the top dock. Double-click the scope labeled SpeedScope to view the motor speed, which closely tracks the reference speed.

To focus the data, double-click anywhere on the plot or click the
button in the scope's toolbar.
As shown above, the motor's rotor speed closely matches the reference speed, and the response is underdamped. Change it to an overdamped response by changing the integrator gain in the PI block. To do this, double-click the SpeedPI subsystem in the DCMotor model file. Double-click the gain block labeled kI to open its properties in the Properties dock on the left. Change the Gain value from 3 to 1.

Rerun the simulation and observe the speed result.

Reset the gain back to 3.
This concludes the section on getting started with Workbench simulation. In the following section, the same model will be run in real time to control an actual DC motor.
Assemble the DC motor-generator set as shown below:

DC generator (the DC motor with an A-quad-B encoder mounted on its back).
DC motor (without the encoder).
Oldham coupler. Tighten if loose using M2.5 hex wrench.
Oldham coupling disk. Attach it to the motor and generator coupling.
Safety enclosure. The coupling unit resides inside the safety enclosure.
M4 hex socket-head screws - 8.
M2.5 hex wrench. Use it to tighten the motor and generator onto the safety enclosure.
2048-line A-quad-B encoder. Attach the encoder cable to the A-quad-B encoder.
The wiring color code followed is:
DC (Inverter input):
DC +ve - ● (Red)
Ground - ● (Green)
DC -ve - ● (Black)AC (Inverter output):
Phase A - ● (Black)
Phase B - ● (Red)
Phase C - ● (Blue)
The inverter output terminals are located on the front panel of the three-inverter module. Connect the DC motor's negative (-) terminal (black) to phase A of Inverter 1 (black terminal) and the DC motor's positive (+) terminal (red) to phase B of Inverter 1 (red terminal). The DC motor might have a third cable with a green terminal. This is the ground wire and must be left unconnected.
NoteThe motor cable color might be different from the color of the banana terminal. Henceforth when referred to the color of the motor terminal for making connections, it only refers to the color of the banana plug and not the color of the cable.
Similarly, connect the DC generator's negative (-) terminal (black) to phase A of Inverter 2 (black terminal) and the DC generator's positive (+) terminal (red) to phase B of Inverter 2 (red terminal). The DC generator might have a third cable with a green terminal. This is the ground wire and must be left unconnected. Connect the DC power supply to the inverter input located on the back panel of the module.
WarningEnsure that the DC power supply is turned off before making the connections. If the DC power supply does not have a dedicated ground terminal, that connection can be left floating. If present, it is strongly recommended that it be connected to the three-inverter module's ground terminal to mitigate any electrical hazard.
Connect the DSUB-15 terminal of the encoder cable connected to the generator to the Encoder 1 terminal on the back panel of the three-inverter module.
Connect one end of the USB cable (USB-A) to the computer and the other end (USB-B) to the back panel of the three-inverter module.
Turn ON the DC power supply and gradually ramp up the voltage from 0 to 40 V.
WarningThe DC bus voltage must not exceed 42 V. A minimum of 20 V DC is needed to power the auxiliary power converter inside the module. All experiments have been designed with a DC bus voltage of 40 V unless stated otherwise.
Click the
icon in the top dock of Workbench to transition from simulation mode, in which the control algorithm was run on the computer using the linearized motor model,
to real-time mode, in which the control algorithm is executed in real time on a DSP and the generated signals are amplified to drive an actual motor. Workbench automatically identifies the components that need to be evaluated
in real time and translates them into DSP-specific code.

NoteIn real-time mode, the top dock changes color from light blue to light salmon. In this mode, pressing Run immediately downloads the program to the connected real-time controller and begins execution. Any previously programmed code will be overwritten. All necessary laboratory safety precautions must be taken.
Click
to run the control algorithm in real time. The following message will be displayed if the code has been transferred successfully:

Double-click SpeedScope to view the real-time result. Click the
button in the scope's toolbar to fit the entire y-axis across the full simulation time. Press this button whenever the data goes out of focus.
After about 25 s, stop data logging by clicking
in the top dock. This stops only data logging. To power down the inverter, turn OFF the DC power supply and disconnect the USB cable to power down the controller.
This concludes the experiment. It was a brief introduction to various concepts that will be revisited in subsequent experiments.
Attach screenshots of the motor speed from the simulation and real-time modes.
If the motor does not track the reference speed at high speeds, explain how to correct the problem.
Review the additional resource material on the various features of Workbench available here.