0% found this document useful (0 votes)
3 views

Simulation SPWM Microcontroller

This paper presents a dynamic control system using a microcontroller to generate a three-phase SPWM command for an inverter operating at constant U/f. It discusses the implementation of a simulation model in Matlab-Simulink, focusing on control signal generation and modulation techniques to optimize inverter performance. The results demonstrate the system's capability to produce desired control pulses at various frequencies while highlighting limitations related to computation time on the microcontroller.

Uploaded by

daniel45675
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Simulation SPWM Microcontroller

This paper presents a dynamic control system using a microcontroller to generate a three-phase SPWM command for an inverter operating at constant U/f. It discusses the implementation of a simulation model in Matlab-Simulink, focusing on control signal generation and modulation techniques to optimize inverter performance. The results demonstrate the system's capability to produce desired control pulses at various frequencies while highlighting limitations related to computation time on the microcontroller.

Uploaded by

daniel45675
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Simulation of a Three-Phase SPWM Command

System with Microcontroller

Mitică Iustinian NEACĂ Andreea Maria NEACĂ


Faculty of Electrical Engineering/I.E.E.A. Department Faculty of Electrical Engineering/I.E.E.A. Department
University of Craiova University of Craiova
Craiova, România Craiova, România
[email protected] [email protected]

Abstract— This paper proposes a dynamic system based on that is the speed can be changed through sliding s , power
microcontroller, that generates a three-phase SPWM command, supply frequency f and the number of pole pairs p .
with variable frequency which is needed to an inverter designed
to operate at U/f = const. It is presented a original simulation The maximum speed of synchronism ( n0 ), is imposed on
system, whose implementation and testing has allowed the
establishment of directions of action necessary for the design of
the frequency of the rotor voltage f . On the other hand the
the software for programming the microcontroller. In the national electricity supply is concern on ensuring a constant
research carried out has always been analyzed how external frequency (50 Hz).
commands can be sent to the microcontroller. There are
considered as essential three external prescriptions: the
The above clearly highlights the need of using static
frequency of the three-phase sinusoidal voltage, the maximum converters to generate supply voltage of another frequency.
voltage to the inverter output and the multiplication factor for Due to the superior performance that can offer, lately most
frequency of the triangular wave used to generate SPWM researches were directed towards the achievement of vector
modulation. control of induction motors. Control processes based on the
principle of field orientation allow the control of the torque
Keywords— PWM-sinusoidal, U/f=const., microcontroller,
with high performances (small inertia, well-damped).This
simulation.
advantage is balanced by the need to purchase complex and
expensive electronic equipment.
Currently, the most common method of speed control of an
I. INTRODUCTION induction motor remains changing the frequency of the supply
The issue itself, the realization of electrical drives based on voltage. Adjustment range is very wide; the yield is good and
the use of static converters today is no longer a novelty. the mechanical characteristics are rigid. Practical realization of
Regarding however the design and implementation of concrete the change of the frequency involves motor voltage supply
systems based on power electronics, the last period showed a from sources with variable frequency, which can be: electric
special trend. This is due to the growth of the performances of rotary converters or frequency static converters. Assuming that
these drives compared to conventional drives, due to special the supply voltage U 1 = ct. , it follows that, at frequency
monitoring and control possibilities they offer. f < f N the resulting flow increases, causing the saturation of
Static converters consisting of semiconductor devices the machine. Therefore, for speeds less than the nominal value,
(static switches) and auxiliary components (coils, transformers, it changes both the voltage and the frequency, maintaining a
capacitors, etc.) are used to modify one or more parameters of constant ratio U 1 f . Using this classical control method
the supply with electricity of a consumer. (scalar) it has the advantage of a lower cost price of the
Viewed from the perspective of electrical drives, the equipment and it is preferred for smaller installations, without
asynchronous motor is the cheapest motor, with the lowest outstanding dynamic demands.
consumption of copper, but much more difficult to control Always, when we want to achieve an inverter for an electric
compared to the DC motor. This explains the need for further drive we will start from energy consumption needs that the
research in the field of electrical drives with induction motors. installation presents. They are the ones that determine
Three-phase asynchronous motor has a rigid natural constructively the force assembly. Many manufacturers of
mechanical characteristic. The expression of its speed is: electronic components provide either discrete components or
integrated power modules as three-phase bridges, single phase
60 ⋅ f bridges or half-bridges that encompasses multiple devices
n = n0 (1 − s ) = (1 − s ) (1)
p (IGBT, MOSFET). Also, there are available numerous types of
integrated drivers that can operate power switching devices.
For example CI-IRS23365DM can command optimally up to 6

978-1-4799-4161-2/14/$31.00 ©2014 IEEE


devices IGBT or MOSFET configured in a fully controlled fp
bridge. - mf = - frequency modulation ratio
fr
Since the user has provided such devices at a reasonable
price, it remains as the area where it may act to increase the ∧
performance of the inverter, only the command area, which Ur
- ma = ∧
- amplitude modulation ratio.
will provide logical impulses to the driver circuits. In this area
U tr
is implemented the control strategy and through its interaction
with the information received from the path of reaction of the Modulation can be synchronous (when m f ∈ N ) or
motor operated, based on some algorithms and regulators, there
are issued signals for optimal control. Moreover, this control asynchronous (when m f ∈ R ). In synchronous modulation the
area is the most expensive because it includes also the software harmonics content depends on m f and can be easily filtered.
when it is done with programmable electronics as
microcontroller, DSP or microprocessor. In general, at inverters that produce sine wave voltage with
variable frequency the modulation is asynchronous. To avoid
asynchronous modulation the control system proposed in this
II. THE TOPIC APPROACHED paper provides a dynamic frequency correction of the triangle
This paper aims to implement a control system that would wave. Moreover, this frequency is calculated so that it is
underpin a three-phase voltage inverter. The main requirements always a multiple of 6, to provide the similarity of the control
imposed were: signals generated for the three phases.
- The system will generate control pulses required for a fully The domain 0 ≤ m a ≤ 1 is called linear domain because in
controlled three-phase inverter bridge (6 switching elements); the sinusoidal PWM technique the output voltage vary linearly
- The wave generated in each phase will be sinusoidal with m a . The increase of the voltage at the inverter output
(SPWM); more than 61% of the DC voltage can be achieved by the use
of some non-sinusoidal reference waves. One of the commonly
- The output voltage and frequency shall keep the ratio
used solutions is to add the harmonic 3 to the sinusoidal wave.
U This order harmonics are present in the phase voltage, but are
= ct. for f ≤ 50 Hz ;
f missing from the line voltage. In the control system presented
in this paper was opted for this solution.
- At frequency higher than 50Hz the voltage remains constant;
A second element opted for was the development of a
- Adjustable frequency of the triangular signal; control system with three levels, which has the advantage of
- To ensure the protection of the short circuit current source reducing switching losses in the inverter [1,2,3,4]. This
by erroneous command. requires the use of two triangular waves in order to obtain the
control impulses.
To the ones mentioned above it was added also the request
to use a general purpose microcontroller with a cost price as
III. SIMULATION
low as possible.
Based on the functional and constructive strategy presented
It should be noted that, in the literature, there are summary above, we have designed a simulation model for the control
descriptions of SPWM control systems based on system, developed in Matlab-Simulink. The overall simulation
microcontroller, but they work based on some predefined tables system is presented in Annex 1. It is quite complex and may
for the command angles, and do not fully meet the control show some functional subsystems, with functionality and
requirements listed above [9]. structure almost identical for the three phases.
A first step was to choose the type of control signals It can be seen that there are four common elements of the
corresponding to sinusoidal modulation that will be generated. three phases: clock, generated wave frequency setting block,
The principle of obtaining the command impulses for such a triangular wave generator and maximum output voltage setting
modulation is based on comparing a triangle wave u tr (t ) , block. The setting block for the generated wave frequency was
∧ designed in view of the implementation on a microcontroller
having the amplitude U tr and the frequency f p , with a either by an analog input (potentiometer) or either through a
∧ digital prescription from the keyboard, or using a digital
sinusoidal reference wave u r (t ) having the amplitude U r and potentiometer with non-volatile memory (e.g. TPL0102 or
the frequency f r . The frequency of the reference wave is equal MAX5391).
to the frequency desired for the output AC voltage of the The block for triangular wave generation has an entry for
inverter and its magnitude is related to the RMS value of the the prescription of the multiplication factor of the switching
fundamental voltage at the inverter output. frequency. Based on this prescription, the basic frequency of
Sinusoidal PWM technique characteristic parameters are: the triangular wave, which has been set to around 1 kHz, can
be multiplied by a factor (natural number).
In order to obtain the six series of control pulses, on each of The block “amplitude determination” ensures the ratio
the three phases cooperates four functional blocks: sinusoidal U
generator, amplitude determination, prevention simultaneous = ct. for frequencies below 50Hz and constant voltage for
f
conduction and the control pulse generator.
frequencies higher than 50Hz.
The block “sinusoidal generator” outputs a composed wave,
with the following form [5]: Thus, the generated modulating wave is validated by the
action of the block that prevents simultaneous conduction
⎛ 1 ⎞ (Fig.1) and is applied to the block that generates control pulses
u (t ) = 1,15 ⋅ ⎜ sin ωt + ⋅ sin 3ωt ⎟ (2) (Fig.2). This ensures the impossibility of occurrence of
⎝ 6 ⎠ simultaneously commands on the two switching devices
connected to one phase and eliminates the shorting of the DC
source.

Fig.1. Prevention simultaneous conduction block

Fig.2. Control pulse generator block

Annex 2 shows all the impulses generated for the required the increase over 50Hz the pulses are generated considering a
frequency of 50Hz. In Fig.3 are compared the control impulses constant output voltage, while at 30Hz the control pulses at the
from the phase R at 30Hz, 50Hz and 60Hz (command + in blue output of the inverter shall provide a voltage having the set
color and command – in magenta color). It is noted that after value of 60% from the one at 50Hz.
Fig.3. Control pulses on phase R

The only impediment was given by the fact that this type of
IV. EXPERIMANTAL RESULTS microcontroller is set from factory a frequency of the system of
The results and observations obtained from simulations 1MHz, and the program contains many instructions. Internal
allowed the development of the program that has been operations related to these instructions (over 160 lines of code)
implemented in the microcontroller. For testing we used a summarizes a lot of working time at a frequency of 1MHz and
microcontroller type ATMEGA328, from an Arduino Uno this has imposed limitations on the increasing the frequency of
board. We have chosen it due to the easy way we can make the triangular wave. For example, the simple addition of two
changes in the program. terms of 8-bit requires a time of about 4μs [6].
The results obtained and presented in the oscillograms from In Fig. 4. are presented the oscillograms of pulses provided
the following figures confirmed that the software is working by the microcontroller for 25Hz, 40Hz, 50Hz and 60Hz. The
correctly and that the microcontroller can generate the desired first three signals are controls on the positive side of the three
control pulses. phases (R+, S+, T+), and the fourth signal presents the control
pulses on the negative side of the R- phase.
25 Hz 40Hz

50Hz 60Hz
Fig.4. Pulses generated at different frequencies

time amounted to be less than 50μs. In such conditions, there


V. CONCLUSIONS AND FURTHER DIRECTIONS are two main actions as further directions:
Following the steps undertaken up to present, in the - Optimization of a source code to be loaded into the
initiative to develop a cheaper control system, viable, and with microcontroller from the point of view of reducing the
technical performance as high as possible, able to control an operating time of a cycle;
U
inverter in the system = ct. were highlighted the following: - Testing on other microcontrollers with high working
f
frequencies.
- The proposed simulation system, although complex,
readily allows the passage of the various situations determined REFERENCES
by the adopted control strategy;
- By using a compound modulating wave that contains the [1] E.Acha, V.G.Angelidis, O.Anaya-Lara, T.J.E.Miller; Power Electronic
fundamental and the 3rd harmonic, was ensured the increase of Control in Electrical Systems, Newnes-Elsevier, 2002, ISBN: 0-7506-
5126-1.
the inverter output voltage;
[2] F.L.Luo, H.Ye, M.Rashid; Digital Power Electronics and Applications,
U Elsevier Academic Press, 2005, ISBN: 0-1208-8757-6.
- The simulation system allows the work at= ct. , on the [3] M.H.Rashid; Power Electronics Handbook, Elsevier Academic Press,
f 2007, ISBN: 0-12-088479-8.
whole range, or only up to a certain frequency and then [4] M.Malinowski, M.P.Kazmierkowski; Sensorless Control Strategies for
continues at U = ct. ; Three - Phase PWM Rectifiers - Ph.D. Thesis, Warsaw University of
Technology, Warsaw, Poland – 2001.
- Providing the dynamic modification of the triangular [5] ***http://ep.etc.tuiasi.ro/site/Tehnici%20M.I.D/LAB1-2.pdf
wave frequency, coupled with maintaining its divisibility by [6] ***https://learn.sparkfun.com/tutorials/data-types-in-arduino/time-and-
six allowed obtaining pulse trains similar in the six control space
outputs; [7] ***http://www.fornax.sk/~srnka/index.php?page=pwm6_en
The implementation of the system on a microcontroller [8] ***http://www.adrianfreed.com/content/arduino-sketch-high-frequency-
precision-sine-wave-tone-sound-synthesis
highlighted some limitations of the triangular wave frequency
imposed by the amounted computation time, which should be [9] ***http://interface.khm.de/index.php/lab/experiments/arduino-dds-
sinewave-generator/
maintained under a value equal to 1/20 of its period. At a
[10] ***http://learning.codasign.com/index.php?title=Wavetable_Synthesis
frequency of 1kHz would be required that the computation
ANNEX 1

The overall simulation system


ANNEX 2

The impulses generated for 50Hz

You might also like