Você está na página 1de 8

GECE553 Real-time Simulator

Electrical and Computer Engineering Department


Gannon University

Yong-Kyu Jung, Ph.D.

Simulink Modeling for an Electrical Vehicle


A schematic of the RT-Sim suite shown in Figure 1 (a) has been developed for
evaluation of the RT-Sim. The developed RT-Sim suite is illustrated in Figure 1. Figure
1 (a) is the console client. Figure 1 (b) and (c) are the hardware module and the RT-Sim
respectively. The hardware module consisting of an FPGA and an interface boards is
also shown in Figure 1 (b). The console and the RT-Sim are connected with 100 M bps
socket-based Ethernet. The hardware module for the HIL simulation is connected to the
RT-Sim via the PCI card for 8 analog outputs (i.e., +/- 12 Volts), 3 digital outputs, and
4 digital inputs (5 Volts). The interface board converts LVTTL and/or PCI 33/66 MHz
and AGP-2X single-ended type signals (i.e., 3.3 Volts) received from the FPGA board
to 5 Volts TTL signals vice versa although the FPGA board supports 19 different
standards including LVTTL, LVCMOS2/18, Bus LVDS, and so forth. Two 14-bit
output ADCs with 1.5 M Hz sampling rate are used for analog inputs to the hardware
models programmed in the FPGA. A 12-bit resolution DAC with 6 analog outputs
including a VCC and a ground signals is used for analog outputs to the PCI card.

(a)

(b)

(c)

Figure 1. An Evaluation Setup of the RT-Sim Suite


1.

An Electric Vehicle (EV)

A subsystem of an EV was used for evaluation of the RT-Sim suite. As seen in


Figure 2 (a), the complete Simulink closed-loop model of an EV subsystem was
modeled. The EV subsystem consists of a battery for supplying DC power, a DC motor
for driving, and components for sensing speed of EV and charging level of the battery,
and a control unit for controlling speed and torque of the DC motor. The EV subsystem
includes a 25 horsepower, four quadrant operation wound DC motor. The model is
designed to execute in discrete time with a sampling rate of 5 micro-seconds. The
control unit controls speed of the armature. Inputs of the control unit are the desired
speed, in RPM, and the armature speed, in RPM. Outputs of the control unit are the
speed change and armature current. The control unit controls the armature current and
1

GECE553 Real-time Simulator


Electrical and Computer Engineering Department
Gannon University

Yong-Kyu Jung, Ph.D.

prevents the current from surpassing the rated armature current. Inputs of the control
unit are the armature current, armature speed, speed change, and change in armature
current. The control unit outputs the PWM pulses to set the armature voltage to the
desired voltage to achieve the desired armature speed. The control unit also outputs the
control values used to generate the PWM pulses. The DC motor is connected to a 30
volt battery with a linear load torque. The DC motor subsystem block, illustrated in
Figure 2 (a), contains a DC-DC converter connected to the PWM pulses to provide the
desired armature voltage. The motor inputs are the torque load, PWM pulses, and
battery voltage. The motor outputs are the armature current, armature speed, armature
voltage, and the field voltage.

(a)

(b)
Figure 2. (a) Complete Electric Vehicle Simulink Model and (b) Simulink
Simulation Results
Figure 2 (b) illustrates the simulation results with the reference speed and
engine speed. The results, with a reference speed of 300 RPM, illustrate that the motor
is able to achieve the desired speed within 0.3 seconds with a 10 RPM overshoot. These
results are used as the baseline for the SIL and HIL evaluation of the RT-Sim.

GECE553 Real-time Simulator


Electrical and Computer Engineering Department
Gannon University

Yong-Kyu Jung, Ph.D.

1.1. Speed Controller Design


Figure 3 illustrates the contents of the speed controller. The two inputs of the
speed controller are Motor and Speed. The Motor input is the armature speed feedback
from the DC motor. The Speed input is the reference speed that the motor is to be
running.
The three outputs of the Speed Controller are Ia*(p.u.), N*, and d_N. The
Ia*(p.u.) output is the required armature current per unit request to be processed by the
current controller. The N* output is the rate limited reference speed utilized to ensure
that the motor does not accelerate too quickly. The d_N output is the difference
between the armature speed and the reference speed.
The speed controller is a PI controller which calculates the armature current per
unit to be used by the current controller. The reference speed is rate limited before the
reference speed and armature speed pass through the PI controller. The output of the PI
controller is saturated to ensure that the armature current does not surpass the rated
current of the motor.

Figure 3. Contents of Speed Controller.

1.2. Current Controller Design


Figure 4 illustrates the top-level sub-systems of the current controller, a
regulation switch and current controller. The regulation switch regulates the armature
current request passing through to the current controller. The current controller
contains a PI controller and a PWM cenerator which transmits the PWM pulses to the
IGBT of the DC motor subsystem.
The inputs of the current controller are Motor, Speed, N*, d_N, and Ia*(p.u.)
The motor input is the feedback from the DC motor, the armature current and field
current feedback values are used. The Speed input is the reference speed that the DC
motor is to be running. The N* input is the rate limited version of the reference speed.
The d_N input is the difference between the reference speed and the armature speed.
The Ia*(p.u.) is the requested armature current generated by the speed controller.
3

GECE553 Real-time Simulator


Electrical and Computer Engineering Department
Gannon University

Yong-Kyu Jung, Ph.D.

The outputs of the current controller are Pulses and Ctrl. The Pulses output is
the multiplexed values of the PWM generator fed to the IGBT of the DC Motor
subsystem. The Ctrl output is a bus creator that is used for debugging purposes during
the simulation.

Figure 4. Subsystems of Current Controller.


1.3.

Regulation Switch Design

Figure 5 illustrates the contents of the regulation switch, which regulates the
armature current request going into the current controller. The inputs of the regulation
switch subsystem are d_i, If, T*, N*, d_N, and Ia*(p.u.). The d_i input is the current
feedback from the current controller. The input is the field current feedback from the
DC motor. The T* input is the reference speed that the motor should go. The d_N input
is the difference between the armature and reference speeds. The Ia*(p.u.) input is the
generated armature current output generated by the speed controller.
The outputs of the regulation switch subsystem are Ia*(p.u.), d, and Ref. The
Ia*(p.u.) output is the regularized armature current feeding into the current controller.
The d output is the multiplication value of the current feedback and the field current,
used for debugging purposes. The Ref. output is the reference speed, used for
debugging purposes.

GECE553 Real-time Simulator


Electrical and Computer Engineering Department
Gannon University

Yong-Kyu Jung, Ph.D.

Figure 5. Content of Regulation Switch.

1.4.

Current Controller Design

Figure 6 illustrates the design of the current controller. The current controller
subsystem utilizes a PI controller and a PWM generator which outputs PWM pulses
into the DC motor subsystem. The inputs of the current controller are Ia and Ia*(p.u.).
The Ia input is the armature current feedback from the DC motor. The Ia*(p.u.) input is
the requested armature current which is output by the speed controller.
The current controller subsystem outputs are PWM_Ref, Pulses, SawTooth,
DCycles, Ia*, and d_i. The PWM_Ref output is the Vcontrol output of the PI controller.
The Pulses output is the PWM output, which is comprised of four multiplexed values
with PWMs 1 and 4 having the same value and PWMs 2 and 3 having the same value.
The SawTooth output is the saw tooth generator value and is used for debugging
purposes. The DCycles output is the duty cycle used by each of the four PWMs. The Ia*
output is the converted Ia*(p.u.) value, which is the speed controller output. The d_i
output is the difference between the armature current and the current output by the
speed controller.

GECE553 Real-time Simulator


Electrical and Computer Engineering Department
Gannon University

Yong-Kyu Jung, Ph.D.

Figure 6. Content of Current Controller.

1.5.

Current PI Controller Design

Figure 7 illustrates the content of the PI controller of the current controller


subsystem. The inputs of the PI controller are Ia and Iref. The Ia input is the armature
current feedback from the DC motor. The Iref input is the reference armature currrent
generated by the speed controller.
The PI controller subsystem has one output, Ec. The Ec output is equivalent to
Vcontrol and indicates the equivalent voltage that should be supplied to the DC motor
to generate the appropriate armature current.

Figure 7. Content of Current PI Controller.

1.6.

PWM Subsystem Design

Figure 8 (a) illustrates the content of the PWM generator of the current
controller subsystem. The input of the PWM subsystem is Ref, which is the equivalent
voltage level that the subsystem should output to the DC motor. The outputs of the
PWM subsystem are Pulses and SawTooth. The Pulses output is the multiplexed values

GECE553 Real-time Simulator


Electrical and Computer Engineering Department
Gannon University

Yong-Kyu Jung, Ph.D.

of the Ref input compared to the value of the sawtooth generator. The SawTooth output
is the saw tooth generator value that is used to determine the Pulses output.
Figure 8 (b) illustrates the content of the Sawtooth Generator subsystem of the
PWM subsystem. The Sawtooth Generator subsystem has no inputs and one output,
Out. The Out output is the value of the saw tooth generator that is to be compared with
the Ref. input.

(a)

(b)

Figure 8. Content of (a) PWM Subsystem, (b) Sawtooth Generator, (c) Duty Cycle

1.7. DC Motor Subsystem Design


Figure 9 illustrates the contents of the DC motor subsystem. The motor
subsystem contains two traditional inputs, TL and Pulses. The TL input is the torque
load that is applied to the DC motor. The Pulses input is the four PWM pulses that are
fed into the IGBT subsystem to provide the current voltage level to the DC motor. The
motor subsystem also contains two power system inputs, Va+ and Va-. The Va+ and
7

GECE553 Real-time Simulator


Electrical and Computer Engineering Department
Gannon University

Yong-Kyu Jung, Ph.D.

Va- inputs are connected to the battery and provide the IGBT with the voltage level to
be regulated.
The DC motor subsystem provides three outputs, Motor, Wm, and If. The
Motor output provides the speed and controllers with feedback values corresponding
with the current state of the motor. The Wm outputs the armature speed in radians per
seconds.

(a)

Figure 9. (a) Content of DC Motor Subsystem and (b) Moter Creator.

Você também pode gostar