Sei sulla pagina 1di 1

Contact Us How to Buy Sid Ahmed

Products Solutions Academia Support Community Events

Technical Articles and Newsletters Search Technical Articles Technical Articles 

Overview Search Technical Articles Newsletters Cleve's Corner Collection Sign Up  Contact sales

Creating a Desktop Electric Motor Dynamometer System with TI's


C2000 Support Package and Model-Based Design
By Kerry Grand, MathWorks

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.

Design Requirements and System Components


The fundamental goal of our dynamometer system is to provide a safe and low-cost test environment. Requirements include:

• 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.

Figure 1. High-level architecture of the IM/DC dynamometer


system.

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.

Induction Motor Physical Equations


For this application, we will use field-oriented control (FOC). In FOC, the winding current can be regulated so that the torque is
proportional to a torque constant multiplied by winding current.

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.

The equations are as follows:

Clarke Transform:

2 1 1
id = ia − ib − ic
3 3 3


√3
iq = (ia − ic )
3

Synchronous Speed and Angle:

ωsyn = ωm + ωslip

θsyn = ∫ ωsyn dt

Park Transform:

isd = id cos(θsyn ) + iq sin(θsyn )

isq = −id sin(θsyn ) + iq cos(θsyn )

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 isd d λsd 0 −1 λsd


[ ] = Rs [ ] + [ ] + ωsyn [ ][ ]
νsq isq dt λsq 1 0 λsq

νrd ird d λrd 0 −1 λrd


[ ] = Rr [ ] + [ ] + ωslip [ ][ ]
νrq irq dt λrq 1 0 λrq

λ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

Controlling the Induction Machine


From the IM equations, we know that if we independently control the flux-producing current isd and torque-producing current
isq , we will generate the electromagnetic torque (Figure 2). We can make tradeoffs when selecting the ideal flux- and torque-

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.

Figure 2. High-level diagram of the IM torque and flux control.

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.

Building and Implementing the Closed-Loop IM and DC Dynamometer System


To implement the dynamometer system, we do the following:

1. Extract IM parameters using finite element analysis (FEA)


2. Simulate a closed-loop system model consisting of the IM controller and the plant
3. Generate code to deploy the IM and DC motor controllers to the TI F28335
4. Control, calibrate, and monitor the system with a Vector CANalyzer

Determining Motor Parameters


Often, the first step in creating the dynamometer setup is the most difficult. This step entails calculating or measuring the
following internal motor parameters: magnetizing inductance Lm , stator combined leakage and magnetizing inductance Ls ,
rotor combined leakage and magnetizing inductance Lr , rotor resistance Rs , stator resistance Rr , rated mechanical speed,
rated voltage, and rated slip speed.

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.

Creating the System Model


The next step involves creating a closed-loop IM controller and plant system using the topology described in the section
"Controlling the Induction Machine." This step is illustrated in Figure 3. Note that the core control law is a reusable Simulink
library component, easing the transition from a closed-loop system model to an embedded controller target model. We
recommend abstracting the core controller model from its inputs and outputs so that when we translate from the system model
to the controller model, the internal control law remains unchanged. We analyze system performance using Simulink signal
logging and a MATLAB script, since simulating down to the switching frequency produces a large data set.

Figure 3. Closed-loop IM controller and plant model.

Interfacing the IM and DC Controller Models to Hardware


Once the IM and DC controller system-level simulation models are complete, we incorporate the models into a framework for
production code generation. This involves replacing the input and output processing layers with physical F28335 target blocks.
We interface both the IM and DC controllers to the external current measurement (the ADC block), DC voltage measurement
(the ADC block), speed measurement (the eQEP block), and PWM output (the ePWM block).

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®.

Figure 4. IM controller deployment model.

Figure 5. DC controller deployment model.

Figure 6. Alignment of the PWM signals.

Describing the Final Design and Control System


We use the Vector CANalyzer for dynamometer system control data acquisition for both the IM and DC motors (Figure 7).

Figure 7. Vector CANalyzer control and data acquisition.

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
.

Figure 8 shows the final deployed system.

Figure 8. Final desktop dynamometer system.

Summary and Next Steps


This article describes a workflow for developing a low-cost desktop dynamometer system that lets an engineer develop motor
control algorithms in a safe environment. Model-Based Design enables the development of controllers against an IM plant
model. These controller models are deployed to TI F28335 DSPs interfacing to a Spectrum Digital DMC1500 inverter. Both the
DC and IM motors are supplied by Motorsolver. Finally, control and calibration is obtained using Vector CANcaseXL.

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.

About the Author


Kerry Grand is a principal consulting engineer in MathWorks Consulting Services. He has 19 years of automotive control
design experience, working at two major U.S. automakers on the design and development of production software for
electric vehicle and embedded control systems, with 14 related patents. His areas of specialty at MathWorks include power
systems, electric motor control, automatic code generation, and tool development in the aerospace and automotive
industries. Kerry holds an M.S. in electrical and computer engineering from Oakland University and a B.Sc. in electrical
engineering from Lawrence Technological University.

Published 2013 - 92129v00

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.

Products Used Learn More


• MATLAB • Advanced Electric Drives: Analysis, Control and
• Simulink Modeling Using Simulink
• The Field Orientation Principle in Control of Induction
• Embedded Coder
Motors
• Embedded Code Generation for AC Motor Controllers
• Motor Control Development
• Field-Oriented Control with Simulink, Part 3: Automatic
Tuning of Field-Oriented Controllers for an Induction
Motor (5:25)

View Articles for Related Industries


• Automotive
• Industrial Automation and Machinery
• Semiconductor
• Communication Devices
• Consumer Electronics
• Communication Infrastructure
• Aerospace and Defense

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

Patents Trademarks Privacy Policy Preventing Piracy


© 1994-2018 The MathWorks, Inc.

Potrebbero piacerti anche