Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Overview Search Technical Articles Newsletters Cleve's Corner Collection Sign Up Contact sales
With nearly 50% of the world's electricity consumed by electric motors, more and more companies and universities are
researching and developing energy-saving solutions like variable frequency drives (VFDs).
A VFD regulates motor speed and torque by varying motor input frequency, voltages, and currents. It usually consists of an
embedded controller, an inverter to convert DC voltage to three-phase AC voltage, and a three-phase motor. The motor
typically is a permanent magnet synchronous machine (PMSM) or an induction machine (IM). For both research and control law
development, VFD systems must be tested on a dynamometer. A full-power dynamometer is a costly solution. It is, therefore,
desirable to use a lower-cost dynamometer system that is capable of running at lower DC bus voltage using a current limited
supply, reducing safety and system damage concerns.
This article describes a workflow using Model-Based Design with MATLAB® and Simulink® to develop a desktop or lab
dynamometer. We begin by outlining the hardware and software configuration used to create this closed-loop system, the
physical equations governing the IM, and the underlying control principles. We then describe the main steps in the workflow:
developing and simulating the model, converting the control law to embedded target code, testing the motor controller software
in speed or torque mode, and deploying the code on a dynamometer test system.
• The ability to supply a low-voltage (42 V or less) DC power supply for the inverter so as to reduce the energy potential of the
DC bus, as well as shock hazards
• Safe mechanical housing and fixtures for the IM and DC motors, protecting the operator against coupling failure, unintended
torque commands, or other system failures
• Remote control and calibration capabilities
Figure 1 shows the final configuration of the system, including software and hardware components.
We use a single Sorensen XPH-10 DC power supply to feed both inverters. This setup, which allows for energy recirculation,
enables us to use a smaller power supply. When the IM is running as a motor, the DC motor acts as a generator; effectively, the
DC power supply only has to account for system losses. The two inverters and TI F28335 controllers are Spectrum Digital
DMC1500. The DMC1500 AC input is directly connected to the DC power supply, enabling the inverter DC bus voltage to be
current-limited by the Sorensen power supply. CAN-based control is achieved using the Vector CANcaseXL. The enclosed
motors are supplied by the Motorsolver Dyno Kit and Torque Transducer.
T em = kT ⋅ ia
To regulate FOC for an IM, we need to transform the three-phase currents into a two-phase equivalent and convert the two-
phase equivalent to a DC model. We begin by converting the three-phase currents ABC to a direct and quadrature axis. This is
done using the Clarke and Park transforms with the synchronous winding speed of ωsyn . Winding speed is the sum of the
electrical rotor speed ωm and slip frequency ωslip . The subscripts s and r represent the stator and rotor, respectively.
Clarke Transform:
2 1 1
id = ia − ib − ic
3 3 3
–
√3
iq = (ia − ic )
3
ωsyn = ωm + ωslip
θsyn = ∫ ωsyn dt
Park Transform:
Note that the electrical rotor frequency ωm is measured in the electrical domain, which means it is the product of the
mechanical rotor frequency and machine pole pairs. In addition, in vector form, the governing equations of the induction
machine that relates stator and rotor voltages ν , flux linkages λ, currents i , and electromagnetic torque T em , follow the
equation below. Finally, note that the per-phase machine parameters p correspond to the number of machine poles.
Lm corresponds to the magnetizing inductance, Ls corresponds to the stator combined leakage and magnetizing inductance,
Lr corresponds to the rotor combined leakage and magnetizing inductance, R s is the rotor resistance, and R r is the stator
resistance.
λsd Ls 0 Lm 0 isd
⎡ ⎤ ⎡ ⎤⎡ ⎤
⎢ λsq ⎥ ⎢ 0 Ls 0 Lm ⎥ ⎢ isq ⎥
⎢ ⎥ = ⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥
⎢ λrd ⎥ ⎢ L 0 Lr 0 ⎥ ⎢ ird ⎥
m
⎣ ⎦ ⎣ ⎦⎣ ⎦
λrq 0 Lm 0 Lr irq
p
T em = (λrq ird − λrd irq )
2
We can further simplify the above equations. When the windings of the IM rotor are short-circuited, both νrd and νrq equal
zero. For FOC control, we will align the d-axis with the machine flux so that λrq and d/dt(λrq ) both equal 0. Knowing this, we
can calculate the machine slip ωslip and simplify the electromagnetic torque equations.
Lm
ωslip = isq
τr λrd
where
Lr
τr =
Rr
Finally, under steady-state operation (ird = 0 ) and at rated flux, we derive the DC motor torque equation.
2
p Lm
T em = isd isq
2 Lr
T em = kT ⋅ isq
producing current components. For example, at light loads it may be desirable to reduce the flux-producing current to reduce
system losses, or to control the two currents to obtain the peak torque-per-machine ampere.
We will run the machine at its rated flux until field weakening occurs. After entering the rated speed for field weakening, we will
reduce the current isd inversely as a function of rotor speed.
To control the machine we need to transform the stator feedback currents to their synchronous DC equivalents using
mechanical speed and Clarke and Park transforms. Regulation of the stator currents requires the use of an induction machine
motor model to estimate the machine flux. Using proportional-integral (PI) control, we transform the two currents into the stator
DQ voltages νsd and νsq . We then use νsd and νsq to calculate the duty cycle commands that feed the three-phase inverter
using a space vector modulation technique.
There are two common approaches to the determination of motor parameters: calculating from a finite element analysis model,
and taking a physical measurement with load and no-load tests. We will use the FEA approach, which enables us to obtain the
rotor- and stator- rated voltages, currents, and flux, decomposed to the direct and quadrature axis. Once we know the
relationship between flux and current, we can calculate the rated stator d-axis current from the equations.
When the motor parameters are established, we convert them into Simulink data objects. We can then specify numerical value,
valid ranges, data types, and other important attributes, and tune model gains without manipulating the model files.
Both the IM and DC controllers execute at a 10 kHz rate that is synchronized with the PWM period and end of ADC conversion
(Figures 4 and 5). The ePWM outputs must be aligned using the Sync output selection (Figure 6). Both models are now ready
for production code generation with Embedded Coder®.
The DC motor control consists of two modes of operation: speed mode and duty cycle control. The duty cycle control enables
us to test and integrate the pulse width modulation for the DC motor in a controlled fashion. Following DC motor system
integration, the DC motor will run in speed mode, allowing the IM to run in torque mode. DC motor and inverter monitoring
consists of the phase currents ia and ib , rotor speed ωmech , and DC bus voltage vbus .
Like the DC motor, the IM motor control uses two modes of operation: torque and voltage/frequency (V/F) mode. V/F mode
allows the integrator to test the inverter and IM motor running at a constant speed. Once integration is complete, the motor will
run primarily in torque mode. IM motor and inverter monitoring consists of the phase currents ia and ib , rotor speed ωmech , and
DC bus voltage vbus . It also consists of the estimated torque tqest and the synchronous phase d and q axis currents isd b and f
isq
f
b
.
This scope of this work could be extended by introducing additional motor technologies such as PMSM or switched reluctance
as supported by Motorsolver.
The methods used in this system could be refined through incorporating CAN Calibration Protocol for instrumentation, which
removes the need to physically route signals and parameters. Additionally, a detailed development of PWM switching
algorithms, such as dead time compensation, would provide a lower sine wave distortion for the motor phase currents.
References
• Mohan, Ned. Advanced Electric Drives: Analysis, Control and Modeling Using Simulink, MNPERE, 2001.
• Trzynadlowski, Andrzej M. The Field Orientation Principle in Control of Induction Motors (Power Electronics and Power
Systems), Kluwer Academic Publishers, 1994.
MathWorks Explore Products Try or Buy Learn to Use Get Support About MathWorks
Accelerating the pace of engineering and
MATLAB Downloads Documentation Installation Help Careers
science
Simulink Trial Software Tutorials Answers Newsroom
MathWorks is the leading developer of Student Software Contact Sales Examples Consulting Social Mission
mathematical computing software for
Hardware Support Pricing and Videos and Application Status Contact Us
engineers and scientists.
Licensing Webinars
File Exchange License Center About MathWorks
Discover… How to Buy Training
United States
Join the conversation