The document provides a final report on the design and implementation of a space vector modulated (SVM) three-phase inverter. It includes a discussion of SVM pulse width modulation theory, a computer simulation of sinusoidal PWM, and an implementation of the SVM technique. The implementation was broken into four modules: an inverter module, an inverter control module, a calculation module, and a user interface control module. Simulation results showed the SVM technique producing the desired three-phase output with minimized harmonics.
Study of sinusoidal and space vector pulse width modulation techniques for a ...eSAT Journals
Abstract
This paper compares and evaluates the performance of Sinusoidal Pulse Width Modulation (SPWM) and Space Vector Pulse Width
Modulation (SVPWM) techniques for a three-level inverter by cascading two two-level inverters. In this topology, four power
semiconductor switches are used per phase and a total of twelve switches are required. The simulation study shows that SVPWM is
superior to SPWM in the aspects of better DC-bus utilization and offering better spectral performance.
Index Terms: space vector modulation, multi-level inverters, sine-triangle modulation, and cascaded inverter
Space Vector Pulse Width Modulation Schemes for Two-Level Voltage Source Inve...IDES Editor
Space Vector Pulse Width Modulation (SVPWM)
method is an advanced, computation intensive PWM method
and possibly the best among all the PWM techniques for
variable frequency drive applications. The SVPWM is an
alternative method for the determination of switching pulse
width and their position. The major advantage of SVPWM
stem from the fact that, there is a degree of freedom of space
vector placement in a switching cycle. This feature improves
the harmonic performance of this method. This method has
been finding widespread application in recent years because
of the easier digital realization and better dc bus utilization.
In this paper, three SVPWM schemes, called 7-segment space
vector modulation (SVM), 7-segment SVM with even-order
harmonic elimination and 5-segment (discontinuous) SVM
are studied in detail. The theoretical analysis, design,
switching sequence and SIMULINK implementation of these
three SVM schemes is presented in step-by-step manner
1. The document presents space vector modulation for two leg inverters. Space vector modulation treats the inverter as a single unit and provides better voltage utilization compared to sinusoidal pulse width modulation.
2. Space vector modulation represents the reference voltage as a combination of four switching vectors and determines the switching times of each transistor based on the location of the reference vector in the selected sector.
3. Simulation results show that space vector modulation generates less output voltage harmonics than sinusoidal pulse width modulation for two leg inverters.
The document summarizes a student project to design and implement a 3-phase inverter using an 8051 microcontroller and MOSFET switches. Key aspects include:
1) The project uses Space Vector PWM (SVPWM) technique to generate sine waves with high voltage and low harmonic distortion for driving AC motors.
2) SVPWM approximates the reference voltage using combinations of the eight switching vector patterns.
3) An 8051 microcontroller was programmed to implement the SVPWM algorithm and control the MOSFET switches to generate the three-phase output voltages.
4) The students gained experience with electrical simulation tools and building the circuit with components.
Space Vector Pulse Width Modulation Technique Applied to Two Level Voltage So...Qusai Abdelrahman
Space vector pulse width modulation SVPWM provides a better technique compared to the other pulse width modulation techniques. This paper presents simulation and implementation of SVPWM signal generation for driving three phase two level voltage source inverter VSI, also proposes and analyzes a new switching sequence for generating an SVPWM. Simulation results are obtained using the simulation package PSIM. and the inverter performance is evaluated in terms of total harmonic distortion (THD). The model is experimentally implemented and verified on Arduino Mega Atmega2560 microcontroller.
Fast svm based 3 phase cascaded five level invertereSAT Journals
Abstract Introduction of nearest three vector algorithm is a major achievement in the area of space vector technology. Complexity and severe computations are still the drawbacks of SVM methods mainly for multilevel inverter applications. A fast SVM technique is introduced in this project which allows the calculation of switch time duration and the efficient determination of switching times based on the two level inverter scheme. SVM modulating waves are generated based on the two level system and then this modulating waves are compared with required number of carrier signals in order to generate the switching pulses for the inverter. Four triangular carrier signals are needed for a five level system in order to generate the switching pulses. Coordinates of the nearest three voltage vectors is not needed, so the complexity of the SVM technique can be reduced and it is the major advantage of the proposed technique compared with conventional SVM techniques used for multilevel inverters. A three phase five level cascaded H bridge topology is used here to verify the effectiveness of the proposed technique. MATLAB simulation and hardware implementation of the proposed system is done. From the analysis of both simulation and hardware it is clear that proposed SVM technique have more fundamental output and less THD than sinusoidal PWM technique. Key Words: Cascaded H bridge, Multilevel, Modulating wave, Space vector
A Refined Space Vector PWM Signal Generation for Multilevel InvertersIDES Editor
A refined space vector modulation scheme for
multilevel inverters, using only the instantaneous sampled
reference signals is presented in this paper. The proposed
space vector pulse width modulation technique does not require
the sector information and look-up tables to select the
appropriate switching vectors. The inverter leg switching times
are directly obtained from the instantaneous sampled
reference signal amplitudes and centers the switching times
for the middle space vectors in a sampling time interval, as in
the case of conventional space vector pulse width modulation.
The simulation results are presented to a five-level inverter
system for dual-fed induction motor drive. The dual-fed
structure is realized by opening the neutral-point of the
conventional squirrel cage induction motor. The five-level
inversion is obtained by feeding the dual-fed induction motor
with four-level inverter from one end and two-level inverter
from the other end.
The peer-reviewed International Journal of Engineering Inventions (IJEI) is started with a mission to encourage contribution to research in Science and Technology. Encourage and motivate researchers in challenging areas of Sciences and Technology.
Study of sinusoidal and space vector pulse width modulation techniques for a ...eSAT Journals
Abstract
This paper compares and evaluates the performance of Sinusoidal Pulse Width Modulation (SPWM) and Space Vector Pulse Width
Modulation (SVPWM) techniques for a three-level inverter by cascading two two-level inverters. In this topology, four power
semiconductor switches are used per phase and a total of twelve switches are required. The simulation study shows that SVPWM is
superior to SPWM in the aspects of better DC-bus utilization and offering better spectral performance.
Index Terms: space vector modulation, multi-level inverters, sine-triangle modulation, and cascaded inverter
Space Vector Pulse Width Modulation Schemes for Two-Level Voltage Source Inve...IDES Editor
Space Vector Pulse Width Modulation (SVPWM)
method is an advanced, computation intensive PWM method
and possibly the best among all the PWM techniques for
variable frequency drive applications. The SVPWM is an
alternative method for the determination of switching pulse
width and their position. The major advantage of SVPWM
stem from the fact that, there is a degree of freedom of space
vector placement in a switching cycle. This feature improves
the harmonic performance of this method. This method has
been finding widespread application in recent years because
of the easier digital realization and better dc bus utilization.
In this paper, three SVPWM schemes, called 7-segment space
vector modulation (SVM), 7-segment SVM with even-order
harmonic elimination and 5-segment (discontinuous) SVM
are studied in detail. The theoretical analysis, design,
switching sequence and SIMULINK implementation of these
three SVM schemes is presented in step-by-step manner
1. The document presents space vector modulation for two leg inverters. Space vector modulation treats the inverter as a single unit and provides better voltage utilization compared to sinusoidal pulse width modulation.
2. Space vector modulation represents the reference voltage as a combination of four switching vectors and determines the switching times of each transistor based on the location of the reference vector in the selected sector.
3. Simulation results show that space vector modulation generates less output voltage harmonics than sinusoidal pulse width modulation for two leg inverters.
The document summarizes a student project to design and implement a 3-phase inverter using an 8051 microcontroller and MOSFET switches. Key aspects include:
1) The project uses Space Vector PWM (SVPWM) technique to generate sine waves with high voltage and low harmonic distortion for driving AC motors.
2) SVPWM approximates the reference voltage using combinations of the eight switching vector patterns.
3) An 8051 microcontroller was programmed to implement the SVPWM algorithm and control the MOSFET switches to generate the three-phase output voltages.
4) The students gained experience with electrical simulation tools and building the circuit with components.
Space Vector Pulse Width Modulation Technique Applied to Two Level Voltage So...Qusai Abdelrahman
Space vector pulse width modulation SVPWM provides a better technique compared to the other pulse width modulation techniques. This paper presents simulation and implementation of SVPWM signal generation for driving three phase two level voltage source inverter VSI, also proposes and analyzes a new switching sequence for generating an SVPWM. Simulation results are obtained using the simulation package PSIM. and the inverter performance is evaluated in terms of total harmonic distortion (THD). The model is experimentally implemented and verified on Arduino Mega Atmega2560 microcontroller.
Fast svm based 3 phase cascaded five level invertereSAT Journals
Abstract Introduction of nearest three vector algorithm is a major achievement in the area of space vector technology. Complexity and severe computations are still the drawbacks of SVM methods mainly for multilevel inverter applications. A fast SVM technique is introduced in this project which allows the calculation of switch time duration and the efficient determination of switching times based on the two level inverter scheme. SVM modulating waves are generated based on the two level system and then this modulating waves are compared with required number of carrier signals in order to generate the switching pulses for the inverter. Four triangular carrier signals are needed for a five level system in order to generate the switching pulses. Coordinates of the nearest three voltage vectors is not needed, so the complexity of the SVM technique can be reduced and it is the major advantage of the proposed technique compared with conventional SVM techniques used for multilevel inverters. A three phase five level cascaded H bridge topology is used here to verify the effectiveness of the proposed technique. MATLAB simulation and hardware implementation of the proposed system is done. From the analysis of both simulation and hardware it is clear that proposed SVM technique have more fundamental output and less THD than sinusoidal PWM technique. Key Words: Cascaded H bridge, Multilevel, Modulating wave, Space vector
A Refined Space Vector PWM Signal Generation for Multilevel InvertersIDES Editor
A refined space vector modulation scheme for
multilevel inverters, using only the instantaneous sampled
reference signals is presented in this paper. The proposed
space vector pulse width modulation technique does not require
the sector information and look-up tables to select the
appropriate switching vectors. The inverter leg switching times
are directly obtained from the instantaneous sampled
reference signal amplitudes and centers the switching times
for the middle space vectors in a sampling time interval, as in
the case of conventional space vector pulse width modulation.
The simulation results are presented to a five-level inverter
system for dual-fed induction motor drive. The dual-fed
structure is realized by opening the neutral-point of the
conventional squirrel cage induction motor. The five-level
inversion is obtained by feeding the dual-fed induction motor
with four-level inverter from one end and two-level inverter
from the other end.
The peer-reviewed International Journal of Engineering Inventions (IJEI) is started with a mission to encourage contribution to research in Science and Technology. Encourage and motivate researchers in challenging areas of Sciences and Technology.
Space Vector Modulation with DC-Link Voltage Balancing Control for Three-Leve...IDES Editor
Modified space vector modulation (SVM) for
DC-link voltage balancing of three-level inverter is proposed
here. Effect of the DC-link capacitor voltage deviation on
inverter switching states is presented for three-level
inverter. Pulse pattern arrangements for proposed SVM
using degree of freedom available in choice of redundant
space vectors, sequencing of vectors, and splitting of duty
cycles of vector are best exploited. Seven-segment SVM
scheme and modified closed loop space vector DC-link
voltage balancing control schemes are implemented. The
effectiveness of proposed scheme is verified by simulations
and experimental verification on laboratory prototype.
Four Switch Three Phase Inverter using Space Vector ModulationBiprajit Routh
The document discusses a Four Switch Three Phase Inverter (FSTPI) that uses four power switches in its two legs instead of the six switches used in a conventional three phase inverter. It proposes a pulse width modulation (PWM) method using space vector modulation (SVM) technique to generate control signals for the four switches. Key advantages of the FSTPI include reduced switch count, lower switching and conduction losses, and lower electromagnetic interference. The SVM technique approximates the desired output voltage using four switching vectors. Time durations for the switching vectors are calculated to synthesize the reference voltage vector. Switching sequences and times are determined for each of the four sectors in the space vector diagram.
Two leg three-phase inverters (FSTPIs) have been proposed to be used in low-power; low-cost applications because of the reduced number of semiconductor devices, and space vector pulse width modulation (SVPWM) techniques have also been introduced to control FSTPIs. However, high-performance controllers are needed to implement complicated SVPWM algorithms, which limit their low-cost applications. To simplify algorithms and reduce the cost of implementation, an equivalent scalar method for SVPWM of FSTPIs is proposed. SVPWM for FSTPIs is actually a sine PWM by modulating two sine waves of 600 phase difference with a triangle wave, but in this method third harmonics doesn’t eliminated. So as to eliminate the third harmonics we have to compose a high frequency sine wave to on existing sine waves. So such a special sine PWM can be used to control FSTPIs. The Mathematical and simulation results demonstrate the validity of the proposed method.
http://www.mathworks.com/matlabcentral/fileexchange/authors/126814
This document discusses the digital implementation of space vector modulation (SVM) for a voltage source inverter (VSI) using an FPGA. It describes the SVM technique, how it can generate sinusoidal AC output from the VSI with minimal harmonics. It outlines the stages of digital implementation in MATLAB/Simulink using Xilinx blocks, including sector identification, duty cycle calculation, and generating gating signals. Simulation results validated the SVM method. The digital design was then implemented on an FPGA in real-time to generate switching pulses for the VSI. Testing with a motor load showed good agreement with simulation.
The document provides questions and answers related to power electronics topics such as IGBTs, thyristors, power diodes, MOSFETs, choppers, and inverters. Some key highlights include:
IGBTs are popular due to their lower heat requirements and switching losses compared to other devices. Thyristors can be turned on through various methods including forward voltage, gate, and light triggering. Power diodes have higher voltage, current, and power ratings than signal diodes. IGBTs, MOSFETs, and BJTs are voltage, voltage, and current controlled devices respectively based on their gate/base characteristics. PWM is a common control method for inverters and choppers
The document proposes a switching strategy for space vector modulated current link inverters connected to the power grid. It discusses pulse width modulation techniques and space vector pulse width modulation. The proposed strategy uses symmetrical cell time switching sequences to realize the six current vectors and minimize harmonics. Analytical calculations and experimental results show the strategy provides wide dynamic range for the modulation index and high DC link utilization while maintaining low harmonic levels that satisfy industrial standards.
This document describes a simulation project of a space vector PWM inverter. It provides details of the system configuration including IGBT switches, DC link voltage, frequencies, and load components. It then provides an in-depth explanation of space vector PWM technique, including the principle of PWM, representation of voltage vectors in the dq reference frame, and algorithm for determining switching times. State-space equations for the L-C output filter are also derived. The overall purpose is to simulate and analyze a three-phase PWM inverter using space vector modulation in MATLAB/Simulink.
The document discusses space vector pulse width modulation (SVM) techniques for three-phase voltage source inverters. It explains the principles of SVM including coordinate transformation, reference voltage approximation using switching vectors, and calculation of switching times. Key advantages of SVM over sinusoidal PWM are more efficient voltage utilization and less output harmonic distortion. SVM allows the reference vector locus to reach the maximum circle compared to the inner circle for sinusoidal PWM, improving voltage utilization by around 15%.
Space Vector Modulation in Voltage Sourced Three Level Neutral Point Clamped ...emredurna
The document discusses a 3-level neutral point clamped (NPC) inverter. It has three voltage levels for each phase (+E, 0, -E) and uses space vector modulation (SVM) to generate reference voltages. SVM divides the voltage space into sectors and regions, then uses different combinations of the inverter's switching states to synthesize the reference voltage over small time intervals. Dwell times are calculated to determine how long each switching state is applied. Several SVM switching sequences are presented, including a seven-segment sequence. Simulation waveforms show the output voltage and current are close to sinusoidal.
This document discusses space vector pulse width modulation (SVPWM) for controlling a three-phase inverter that supplies power from a DC source to drive electric machines like wind turbine generators. It provides a brief history and introduction to SVPWM, explaining that it was developed in the 1980s and represents voltage vectors in three-phase space. The document outlines benefits like higher efficiency, voltage control, and reduced losses compared to sinusoidal PWM. It describes implementing SVPWM using an Arduino to generate PWM signals that create an average output voltage through rapid switching between active voltage vectors.
Space Vector Modulation(SVM) Technique for PWM InverterPurushotam Kumar
This document discusses space vector pulse width modulation (SVM) for three-phase voltage source inverters. It begins by introducing SVM and its benefits over other PWM techniques, such as reduced total harmonic distortion. It then provides details on how SVM works, including transforming a three-phase reference signal to a rotating vector in the d-q reference frame. The document explains the eight possible switching states, sectors, and how to calculate switching times to synthesize the reference signal using adjacent active vectors and zero vectors. It concludes by comparing SVM to sinusoidal PWM, showing SVM offers better voltage utilization and harmonic performance.
Sinusoidal PWM and Space Vector Modulation For Two Level Voltage Source Conve...ZunAib Ali
1) The document describes a two level voltage source converter (VSC) that can operate as either a rectifier or inverter using carrier-based sinusoidal pulse width modulation (PWM) or space vector modulation (SVM) control techniques.
2) The two level VSC consists of six switches that can be IGBTs or MOSFETs with anti-parallel diodes, allowing bidirectional power flow between the DC and AC sides.
3) Sinusoidal PWM compares a triangular carrier signal to three-phase modulating waves to generate switching pulses for the converter switches, while SVM represents the converter states as space vectors to calculate switching times.
This document discusses the implementation of space vector modulation for a three-level voltage source converter. It describes the 27 switching states and 19 space vectors of the three-level inverter. It explains how the space vectors can be divided into four groups - zero vector, small vectors, medium vectors, and large vectors. The document also discusses how to determine the sector and triangle locations based on the reference vector, and how to calculate the dwell times for the three nearest space vectors using volt-second balancing. It provides the considerations for switching sequences when the reference vector falls into different regions with different vector combinations.
Simplified svpwm algorithm for neutral point clamped 3 level inverter fed dtc...Asoka Technologies
In this paper, a simplified space vector pulse width modulation (SVPWM) method has been developed for three phase three-level voltage source inverter fed to direct torque controlled (DTC) induction motor drive. The space vector diagram of three-level inverter is simplified into two-level inverter. So the selection of switching sequences is done as conventional two-level SVPWM method.Where in conventional direct torque control (CDTC), the stator flux and torque are directly controlled by the selection of optimal switching modes. The selection is made to restrict the flux and torque errors in corresponding hysteresis bands. In spite of its fast torque response, it has more flux, torque and current ripples in steady state. To overcome the ripples in steady state, a space vector based pulse width modulation (SVPWM) methodology is proposed in this paper. The proposed SVPWM method reduces the computational burden and reduces the total harmonic distortion compared with 2-level one and the conventional one also. To strengthen the voice simulation is carried out and the corresponding results are presented.
This document outlines the design of a 200 Watt, 150 Vrms PWM bipolar inverter with the following key points:
1. The design process includes calculating component values based on design requirements, building the circuit in Multisim software, and analyzing the simulation results.
2. Key calculations include determining the required DC bus voltage to achieve the 150Vrms AC output voltage despite voltage drops, as well as component sizing based on the given power, modulation index, and carrier frequency specifications.
3. Simulation results show the generated PWM switching signals and the final inverter output voltage matching the desired 150Vrms sinusoidal waveform.
Implementation of SVPWM control on FPGA for three phase MATRIX CONVERTERIDES Editor
This paper presents a simple approach for
implementation of a Space Vector Pulse Width
Modulation (SVPWM) Technique for control of three
phase Matrix Converter (MC) using MATLAB/Simulink
& FPGA Software. The Matrix converter is a direct
AC/AC Power conversion without an intermediate DC
link. This converter is inherently capable of bi-directional
power flow and also offers virtually sinusoidal input
currents. The SVPWM technique improves good voltage
transfer ratio with less harmonic distortion. This paper
presents FPGA test bench waveforms & MATLAB
simulations of SVPWM pulses and output waveforms for
three phase matrix converter.
Pulse-Width Modulation (PWM) techniques are used to control output voltages of power converters. There are three main PWM methods: Sine PWM uses a reference sine wave compared to a triangular carrier wave to generate PWM signals; Hysteresis PWM uses a feedback control loop with variable switching frequency to maintain output within a hysteresis band; Space Vector PWM approximates the reference voltage vector using combinations of the eight switching states and their durations to reduce harmonic distortion and improve voltage utilization.
Harmonic comparisons of various PWM techniques for basic MLISaquib Maqsood
Cascaded inverters are ideal for connecting renewable energy sources with an AC grid, because of the need for separate dc sources, which is the case in applications such as photovoltaic or fuel cells. The inverter could be controlled to either regulate the power factor of the current drawn from the source or the bus voltage of the electrical system where the inverter was connected. The modulation techniques are crucial in operating any inverter at desired conditions. In this work different PWM techniques are implemented for five level cascaded multilevel inverter and THD variation is analyzed.
Sinusoidal PWM has been a very popular technique used in AC motor control. This is a method that employs a triangular carrier wave modulated by a sine wave and the points of intersection determining the switching points of the power devices in the inverter.
Vf controlo of 3 phase induction motor using space vector modulationchino_749
The document describes space vector modulation (SVM), an advanced switching algorithm for voltage source inverters that controls AC induction motors. SVM gives 15% more voltage output compared to sine PWM, improving voltage utilization and minimizing total harmonic distortion and switching losses. It represents the three-phase motor voltages as vectors in space and controls motor voltage and frequency by controlling the amplitude and frequency of the reference space vector. The SVM algorithm allows generating the maximum possible line-to-line voltage of the DC bus supply voltage, improving motor torque and dynamic response over sine PWM.
Project is designed to develop a FACTs (Flexible AC Transmission) by TSR (Thyristor Switch Reactance) used in two ways. Read more about this project here.
Space Vector Modulation with DC-Link Voltage Balancing Control for Three-Leve...IDES Editor
Modified space vector modulation (SVM) for
DC-link voltage balancing of three-level inverter is proposed
here. Effect of the DC-link capacitor voltage deviation on
inverter switching states is presented for three-level
inverter. Pulse pattern arrangements for proposed SVM
using degree of freedom available in choice of redundant
space vectors, sequencing of vectors, and splitting of duty
cycles of vector are best exploited. Seven-segment SVM
scheme and modified closed loop space vector DC-link
voltage balancing control schemes are implemented. The
effectiveness of proposed scheme is verified by simulations
and experimental verification on laboratory prototype.
Four Switch Three Phase Inverter using Space Vector ModulationBiprajit Routh
The document discusses a Four Switch Three Phase Inverter (FSTPI) that uses four power switches in its two legs instead of the six switches used in a conventional three phase inverter. It proposes a pulse width modulation (PWM) method using space vector modulation (SVM) technique to generate control signals for the four switches. Key advantages of the FSTPI include reduced switch count, lower switching and conduction losses, and lower electromagnetic interference. The SVM technique approximates the desired output voltage using four switching vectors. Time durations for the switching vectors are calculated to synthesize the reference voltage vector. Switching sequences and times are determined for each of the four sectors in the space vector diagram.
Two leg three-phase inverters (FSTPIs) have been proposed to be used in low-power; low-cost applications because of the reduced number of semiconductor devices, and space vector pulse width modulation (SVPWM) techniques have also been introduced to control FSTPIs. However, high-performance controllers are needed to implement complicated SVPWM algorithms, which limit their low-cost applications. To simplify algorithms and reduce the cost of implementation, an equivalent scalar method for SVPWM of FSTPIs is proposed. SVPWM for FSTPIs is actually a sine PWM by modulating two sine waves of 600 phase difference with a triangle wave, but in this method third harmonics doesn’t eliminated. So as to eliminate the third harmonics we have to compose a high frequency sine wave to on existing sine waves. So such a special sine PWM can be used to control FSTPIs. The Mathematical and simulation results demonstrate the validity of the proposed method.
http://www.mathworks.com/matlabcentral/fileexchange/authors/126814
This document discusses the digital implementation of space vector modulation (SVM) for a voltage source inverter (VSI) using an FPGA. It describes the SVM technique, how it can generate sinusoidal AC output from the VSI with minimal harmonics. It outlines the stages of digital implementation in MATLAB/Simulink using Xilinx blocks, including sector identification, duty cycle calculation, and generating gating signals. Simulation results validated the SVM method. The digital design was then implemented on an FPGA in real-time to generate switching pulses for the VSI. Testing with a motor load showed good agreement with simulation.
The document provides questions and answers related to power electronics topics such as IGBTs, thyristors, power diodes, MOSFETs, choppers, and inverters. Some key highlights include:
IGBTs are popular due to their lower heat requirements and switching losses compared to other devices. Thyristors can be turned on through various methods including forward voltage, gate, and light triggering. Power diodes have higher voltage, current, and power ratings than signal diodes. IGBTs, MOSFETs, and BJTs are voltage, voltage, and current controlled devices respectively based on their gate/base characteristics. PWM is a common control method for inverters and choppers
The document proposes a switching strategy for space vector modulated current link inverters connected to the power grid. It discusses pulse width modulation techniques and space vector pulse width modulation. The proposed strategy uses symmetrical cell time switching sequences to realize the six current vectors and minimize harmonics. Analytical calculations and experimental results show the strategy provides wide dynamic range for the modulation index and high DC link utilization while maintaining low harmonic levels that satisfy industrial standards.
This document describes a simulation project of a space vector PWM inverter. It provides details of the system configuration including IGBT switches, DC link voltage, frequencies, and load components. It then provides an in-depth explanation of space vector PWM technique, including the principle of PWM, representation of voltage vectors in the dq reference frame, and algorithm for determining switching times. State-space equations for the L-C output filter are also derived. The overall purpose is to simulate and analyze a three-phase PWM inverter using space vector modulation in MATLAB/Simulink.
The document discusses space vector pulse width modulation (SVM) techniques for three-phase voltage source inverters. It explains the principles of SVM including coordinate transformation, reference voltage approximation using switching vectors, and calculation of switching times. Key advantages of SVM over sinusoidal PWM are more efficient voltage utilization and less output harmonic distortion. SVM allows the reference vector locus to reach the maximum circle compared to the inner circle for sinusoidal PWM, improving voltage utilization by around 15%.
Space Vector Modulation in Voltage Sourced Three Level Neutral Point Clamped ...emredurna
The document discusses a 3-level neutral point clamped (NPC) inverter. It has three voltage levels for each phase (+E, 0, -E) and uses space vector modulation (SVM) to generate reference voltages. SVM divides the voltage space into sectors and regions, then uses different combinations of the inverter's switching states to synthesize the reference voltage over small time intervals. Dwell times are calculated to determine how long each switching state is applied. Several SVM switching sequences are presented, including a seven-segment sequence. Simulation waveforms show the output voltage and current are close to sinusoidal.
This document discusses space vector pulse width modulation (SVPWM) for controlling a three-phase inverter that supplies power from a DC source to drive electric machines like wind turbine generators. It provides a brief history and introduction to SVPWM, explaining that it was developed in the 1980s and represents voltage vectors in three-phase space. The document outlines benefits like higher efficiency, voltage control, and reduced losses compared to sinusoidal PWM. It describes implementing SVPWM using an Arduino to generate PWM signals that create an average output voltage through rapid switching between active voltage vectors.
Space Vector Modulation(SVM) Technique for PWM InverterPurushotam Kumar
This document discusses space vector pulse width modulation (SVM) for three-phase voltage source inverters. It begins by introducing SVM and its benefits over other PWM techniques, such as reduced total harmonic distortion. It then provides details on how SVM works, including transforming a three-phase reference signal to a rotating vector in the d-q reference frame. The document explains the eight possible switching states, sectors, and how to calculate switching times to synthesize the reference signal using adjacent active vectors and zero vectors. It concludes by comparing SVM to sinusoidal PWM, showing SVM offers better voltage utilization and harmonic performance.
Sinusoidal PWM and Space Vector Modulation For Two Level Voltage Source Conve...ZunAib Ali
1) The document describes a two level voltage source converter (VSC) that can operate as either a rectifier or inverter using carrier-based sinusoidal pulse width modulation (PWM) or space vector modulation (SVM) control techniques.
2) The two level VSC consists of six switches that can be IGBTs or MOSFETs with anti-parallel diodes, allowing bidirectional power flow between the DC and AC sides.
3) Sinusoidal PWM compares a triangular carrier signal to three-phase modulating waves to generate switching pulses for the converter switches, while SVM represents the converter states as space vectors to calculate switching times.
This document discusses the implementation of space vector modulation for a three-level voltage source converter. It describes the 27 switching states and 19 space vectors of the three-level inverter. It explains how the space vectors can be divided into four groups - zero vector, small vectors, medium vectors, and large vectors. The document also discusses how to determine the sector and triangle locations based on the reference vector, and how to calculate the dwell times for the three nearest space vectors using volt-second balancing. It provides the considerations for switching sequences when the reference vector falls into different regions with different vector combinations.
Simplified svpwm algorithm for neutral point clamped 3 level inverter fed dtc...Asoka Technologies
In this paper, a simplified space vector pulse width modulation (SVPWM) method has been developed for three phase three-level voltage source inverter fed to direct torque controlled (DTC) induction motor drive. The space vector diagram of three-level inverter is simplified into two-level inverter. So the selection of switching sequences is done as conventional two-level SVPWM method.Where in conventional direct torque control (CDTC), the stator flux and torque are directly controlled by the selection of optimal switching modes. The selection is made to restrict the flux and torque errors in corresponding hysteresis bands. In spite of its fast torque response, it has more flux, torque and current ripples in steady state. To overcome the ripples in steady state, a space vector based pulse width modulation (SVPWM) methodology is proposed in this paper. The proposed SVPWM method reduces the computational burden and reduces the total harmonic distortion compared with 2-level one and the conventional one also. To strengthen the voice simulation is carried out and the corresponding results are presented.
This document outlines the design of a 200 Watt, 150 Vrms PWM bipolar inverter with the following key points:
1. The design process includes calculating component values based on design requirements, building the circuit in Multisim software, and analyzing the simulation results.
2. Key calculations include determining the required DC bus voltage to achieve the 150Vrms AC output voltage despite voltage drops, as well as component sizing based on the given power, modulation index, and carrier frequency specifications.
3. Simulation results show the generated PWM switching signals and the final inverter output voltage matching the desired 150Vrms sinusoidal waveform.
Implementation of SVPWM control on FPGA for three phase MATRIX CONVERTERIDES Editor
This paper presents a simple approach for
implementation of a Space Vector Pulse Width
Modulation (SVPWM) Technique for control of three
phase Matrix Converter (MC) using MATLAB/Simulink
& FPGA Software. The Matrix converter is a direct
AC/AC Power conversion without an intermediate DC
link. This converter is inherently capable of bi-directional
power flow and also offers virtually sinusoidal input
currents. The SVPWM technique improves good voltage
transfer ratio with less harmonic distortion. This paper
presents FPGA test bench waveforms & MATLAB
simulations of SVPWM pulses and output waveforms for
three phase matrix converter.
Pulse-Width Modulation (PWM) techniques are used to control output voltages of power converters. There are three main PWM methods: Sine PWM uses a reference sine wave compared to a triangular carrier wave to generate PWM signals; Hysteresis PWM uses a feedback control loop with variable switching frequency to maintain output within a hysteresis band; Space Vector PWM approximates the reference voltage vector using combinations of the eight switching states and their durations to reduce harmonic distortion and improve voltage utilization.
Harmonic comparisons of various PWM techniques for basic MLISaquib Maqsood
Cascaded inverters are ideal for connecting renewable energy sources with an AC grid, because of the need for separate dc sources, which is the case in applications such as photovoltaic or fuel cells. The inverter could be controlled to either regulate the power factor of the current drawn from the source or the bus voltage of the electrical system where the inverter was connected. The modulation techniques are crucial in operating any inverter at desired conditions. In this work different PWM techniques are implemented for five level cascaded multilevel inverter and THD variation is analyzed.
Sinusoidal PWM has been a very popular technique used in AC motor control. This is a method that employs a triangular carrier wave modulated by a sine wave and the points of intersection determining the switching points of the power devices in the inverter.
Vf controlo of 3 phase induction motor using space vector modulationchino_749
The document describes space vector modulation (SVM), an advanced switching algorithm for voltage source inverters that controls AC induction motors. SVM gives 15% more voltage output compared to sine PWM, improving voltage utilization and minimizing total harmonic distortion and switching losses. It represents the three-phase motor voltages as vectors in space and controls motor voltage and frequency by controlling the amplitude and frequency of the reference space vector. The SVM algorithm allows generating the maximum possible line-to-line voltage of the DC bus supply voltage, improving motor torque and dynamic response over sine PWM.
Project is designed to develop a FACTs (Flexible AC Transmission) by TSR (Thyristor Switch Reactance) used in two ways. Read more about this project here.
This document is a project report for an automatic room light controller with a bidirectional visitor counter. It includes certificates signed by the project supervisors and head of department certifying the completion of the project by the students. It also includes an acknowledgment, abstract, preface, table of contents, and introduction describing the objective of the project to count the number of people entering and leaving a room and control the room lights accordingly. The block diagram and its description are provided, outlining the main components including a power supply, entry and exit sensors, microcontroller, and relay driver circuit.
SPACE VECTOR MODULATION BASED INDUCTION MOTOR DRIVEpreeti naga
This paper describes an analysis of local PV-wind hybrid systems for supplying electricity to a private house, farmhouse or a small company with electrical power depending on the need at the site. The major system components, work principle and specific working condition are presented in this paper
This document discusses solar power integration with the power grid in India. It provides background on solar power potential and capacity in India. The government has set targets to significantly increase solar capacity through the 12th five-year plan, with a total capacity addition of over 9 GW. Integrating this additional solar power presents challenges for grid operators due to the variable nature of solar power production. The document aims to analyze issues around grid integration of solar power in India and provide suggestions to overcome these challenges.
Project Report on automated toll tax collection system using rfidjeet patalia
This document is a project report submitted for the degree of Bachelor of Technology in Computer Engineering. It outlines an automated toll collection system using RFID technology. The system aims to reduce traffic and manual work at toll booths by allowing vehicles to pass through without stopping. It consists of RFID tags attached to vehicles, RFID receivers at the toll booth, a PC for processing payments, and a gate control to open and close the toll booth barrier. The report describes the objectives, components, software, hardware, workflow, and advantages of the automated toll collection system using RFID technology.
A Report on Bidirectional Visitor Counter using IR sensors and Arduino Uno R3Abhishekvb
The aim of our project is to make a controller which can sense if any person enters the room and it lights up the room automatically and also counts how many person are entering the room or going out of it.
Rfid based toll tax collection system 3 (repaired)KrishNa Patel
This document describes an RFID-based toll tax collection system. It begins with an introduction to RFID technology and how it can be used for electronic toll collection. The proposed system uses RFID tags to identify vehicles and deduct toll fees from a linked account. If the tag is identified, the toll is deducted and the user can pass through. If not identified or if there are insufficient funds, an error message will be displayed on an LCD screen. The document then provides background on AVR microcontrollers and RFID technology before describing the components, software, and hardware used to develop the toll collection system.
This document is a seminar report submitted by Pappu Jaiswal to fulfill requirements for a Bachelor of Technology degree in Electrical Engineering at Madan Mohan Malaviya University of Technology. The report is about solar trees and includes chapters on the working principle of solar cells, the manufacturing process of solar cells, and applications, advantages, and disadvantages of solar trees. It was supervised by Mr. Kishan Bhushan Sahay of the Electrical Engineering department.
GRID INTERCONNECTION OF RENEWABLE ENERGY SOURCES AT DISTRIBUTION LEVEL WITH P...Pradeep Avanigadda
Renewable energy resources (RES) are being increasingly connected in distribution systems utilizing power electronic converters. This project presents a novel control strategy for achieving maximum benefits from these grid-interfacing inverters when installed in 3-phase 4-wire distribution systems. The inverter is controlled to perform as a multi-function device by incorporating active power filter functionality. The inverter can thus be utilized as: 1) power converter to inject power generated from RES to the grid, and 2) shunt APF to compensate current unbalance, load current harmonics, load reactive power demand and load neutral current. All of these functions may be accomplished either individually or simultaneously. With such a control, the combination of grid-interfacing inverter and the 3-phase 4-wire linear/non-linear unbalanced load at point of common coupling appears as balanced linear load to the grid. This new control concept is demonstrated with extensive MATLAB/ Simulink simulation studies and validated through digital signal processor-based laboratory experimental results.
Seminar report on solar tree (by Vikas)dreamervikas
Now a days with the growing population and energy demand we should take a renewable option of energy source and also we should keep in mind that energy should not cause pollution and other natural hazards. In this case the solar energy is the best option for us.
so based on solar energy the solar tree is formed and it acquire very less land.
Project report on bidirectional visitor counter & home automationRoshan Mani
This document is a project report on a bi-directional visitor counter and home automation system built using a microcontroller. The system uses infrared sensors to detect visitors entering and leaving a room and counts the number of visitors accordingly. It also controls the room lights by turning them on when visitors enter and off when the last visitor leaves. The number of current visitors is displayed on 7-segment displays. The report describes the various circuit components used, including resistors, capacitors, an AT89S52 microcontroller, infrared LEDs and phototransistors, relays, displays and more. It provides schematics of the circuit design and explains how the microcontroller software operates the system to count visitors and control lights bi-direction
This document describes a simulation of a space vector PWM controller for a five-level voltage-fed inverter motor drive. It begins by introducing multilevel inverters and some of the challenges in controlling them, specifically the increased complexity with more levels. It then presents a new approach to implementing space vector PWM for a five-level inverter by treating it as a conventional two-level system, making the calculations simpler. The methodology and implementation are described, including estimating switching times. Simulation results are presented showing the current, voltage and THD waveforms both with and without an LC filter. It is concluded that the proposed 2D system approach allows for simple implementation of SVPWM for a five-level inverter using common D
Simulation Of A 4-Switch,3-Phase Inverter Fed Induction Motor (IM) Drive Systemijiert bestjournal
This document summarizes a research paper on simulating a 4-switch, 3-phase inverter driving an induction motor. It begins with an abstract describing the research goal of developing a more cost-effective induction motor drive using a 4-switch inverter instead of a conventional 6-switch inverter. It then provides details on the drive system components, the 4-switch inverter topology, a space vector pulse width modulation control approach, and simulation results showing the speed, torque and current characteristics meeting performance needs while reducing costs. The conclusion is that the 4-switch inverter fed induction motor drive is acceptable considering cost reduction without compromising operation.
This document presents an implementation of space vector modulation (SVM) for a two-level three-phase inverter using a dSPACE DS1104 controller. It describes the principles of SVM, including voltage vector modeling, sector detection, and pulse generation. Hardware experiments were conducted to validate a SVM control algorithm developed in Simulink. Results showed line voltages from the real hardware matched simulation. THD comparisons confirmed SVM provides lower distortion and higher fundamental output than sinusoidal PWM. The dSPACE system allows real-time testing of control algorithms on actual hardware.
This document summarizes a research paper on simulating a 4-switch, 3-phase inverter for driving an induction motor. It begins with an abstract that outlines using a lower-cost 4-switch inverter instead of a conventional 6-switch design. It then provides details on the drive system components, including the rectifier, inverter, motor, and space vector pulse width modulation control approach. Simulation results are presented showing the speed and torque characteristics of the induction motor driven by the 4-switch inverter. The paper concludes that the proposed 4-switch inverter drive system provides cost savings and acceptable performance for industrial applications.
Performance Analysis Of Induction Motor For Voltage Mode And Current Mode Con...IRJET Journal
This document discusses the performance analysis of an induction motor using voltage mode and current mode control. It compares hysteresis current control and space vector pulse width modulation (SVPWM). Hysteresis control directly limits current peaks but SVPWM provides higher voltage output and lower harmonic distortion. The document simulates an induction motor drive using SVPWM-based hysteresis current control in MATLAB. Key steps include Clark transformation to generate reference signals, switching between active and zero vectors to synthesize the reference signal, and using hysteresis control to generate PWM signals from current errors. Simulation results show the SVPWM controller provides good speed and current regulation for the induction motor.
A Novel Direct Torque Control for Induction Machine Drive System with Low Tor...IAES-IJPEDS
This document describes a novel direct torque control method for induction machine drives using space vector modulation (DTC-SVM) to reduce torque and flux ripples. Simulation results show the proposed DTC-SVM control achieves lower ripples compared to the conventional DTC method. The DTC-SVM control strategy is designed and simulated using Matlab/Simulink and implemented on an FPGA using Xilinx System Generator. Simulation results verify the DTC-SVM control is effective at minimizing torque and flux ripples for induction machine drives.
The document discusses pulse width modulation (PWM) variable speed drives that are increasingly used in industrial applications. It describes how PWM is used to generate variable voltage and frequency for AC drives from a three-phase voltage source inverter. Space vector PWM (SVPWM) is highlighted as it provides superior harmonic quality and larger modulation range compared to sinusoidal PWM. SVPWM represents the inverter states as voltage space vectors to calculate duty cycles for adjacent vectors and zero vectors to synthesize the desired output voltage vector. The document outlines the theory of SVPWM and compares different sequencing methods. It also discusses simulations and advantages of PWM including proportional average value, fast switching, noise resistance and less heat.
A NEW FUZZY LOGIC BASED SPACE VECTOR MODULATION APPROACH ON DIRECT TORQUE CON...csandit
The induction motors are indispensable motor types for industrial applications due to its wellknown
advantages. Therefore, many kind of control scheme are proposed for induction motors
over the past years and direct torque control has gained great importance inside of them due to
fast dynamic torque response behavior and simple control structure. This paper suggests a new
approach on the direct torque controlled induction motors, Fuzzy logic based space vector
modulation, to overcome disadvantages of conventional direct torque control like high torque
ripple. In the proposed approach, optimum switching states are calculated by fuzzy logic
controller and applied by space vector pulse width modulator to voltage source inverter. In
order to test and compare the proposed DTC scheme with conventional DTC scheme
simulations, in Matlab/Simulink, have been carried out in different speed and load conditions.
The simulation results showed that a significant improvement in the dynamic torque and speed
responses when compared to the conventional DTC scheme.
Application of SVM Technique for Three Phase Three Leg Ac/Ac Converter TopologyIOSR Journals
This paper presents a simulation of a three-phase three-leg AC/AC converter topology using nine IGBTs and space vector pulse width modulation (SVM) technique. The proposed topology reduces the number of switches compared to conventional back-to-back and matrix converters. Simulation results show the converter provides sinusoidal input and output voltages with unity power factor under constant frequency and variable frequency operation. Experimental results from a 5kVA prototype verify the validity of the proposed scheme.
1) The document proposes an enhanced direct torque control strategy for induction motor drives based on an imaginary swapping instant concept.
2) Simulation results show the proposed technique improves performance over conventional direct torque control, reducing torque and flux ripples by over 60% and speeding transient response times.
3) Benefits of the proposed technique include better robustness against parameter and load variations across low and high speed ranges.
SPEED CONTROL OF INDUCTION MACHINE WITH REDUCTION IN TORQUE RIPPLE USING ROBU...IAEME Publication
In this paper a novel and simple algorithm for three-phase induction motor(IM) under Direct Torque Control (DTC) scheme using Classic DTC switching table for dynamic torque ripple reduction and space-vector modulation scheme for steady state torque and flux control is proposed. The proposed scheme having the advantages of low torque ripples as well as constant switching frequency.
Simulation results are given to prove the ability of the proposed method obtaining good speed control bandwidth while overcoming classic DTC and DTC-SVM drawbacks.
The International Journal of Engineering & Science is aimed at providing a platform for researchers, engineers, scientists, or educators to publish their original research results, to exchange new ideas, to disseminate information in innovative designs, engineering experiences and technological skills. It is also the Journal's objective to promote engineering and technology education. All papers submitted to the Journal will be blind peer-reviewed. Only original articles will be published.
The papers for publication in The International Journal of Engineering& Science are selected through rigorous peer reviews to ensure originality, timeliness, relevance, and readability.
FLC-Based DTC Scheme for a New Approach of Two-Leg VSI Fed Induction MotorIJERA Editor
A new Direct Torque Control (DTC) strategy for Induction Motor (IM) drive fed by a two leg three phase
inverter (i.e., Four switches are used in VSI) was proposed in this paper. The proposed methodology is based on
the emulation of operation of the conventional Six-switch three phase inverter. The combination of four
unbalanced voltage vectors is generated by the two-leg three phase inverter, approaching to the synthesis of the
six balanced voltage vectors of the conventional DTC. This approach has been implemented in the design of the
vector selection table of the proposed DTC strategy. Further, Fuzzy Logic Controller (FLC) is proposed in the
speed controller for the improvement of torque ripples. Convention DTC with Six Switch three phase VSI, twoleg
three phase VSI with PI and Fuzzy Controller are implemented using MATLAB/SIMULINK. Simulation
results have shown that the proposed DTC strategy, two-leg inverter fed IM drive revealed an improved
performance.
This document summarizes a research paper on implementing hysteresis control for space vector pulse width modulation (SVPWM) inverters. It begins by introducing SVPWM and total harmonic distortion (THD). It then describes the principles of SVPWM, including determining switching times and patterns. Next, it defines the hysteresis band control method using a relay function. The document proceeds to model the inverter and describe the switching interval generator and control signal generator blocks. Finally, it provides an overview of the simulation model, which combines hysteresis control with SVPWM.
This document summarizes research on pulse width modulation (PWM) techniques for three-phase inverters. It describes sinusoidal PWM switching schemes that allow control of output voltage magnitude and frequency. Simulation models of three-phase inverters using sawtooth and triangular carrier waveforms are presented and analyzed. The results show that a sawtooth carrier waveform produces a more appropriate three-phase voltage waveform compared to a triangular carrier waveform. In conclusion, sinusoidal PWM inverters can generate clean sinusoidal output voltages through comparison of reference and carrier signals to control switching.
The induction motors are indispensable motor types for industrial applications due to its wellknown advantages. Therefore, many kind of control scheme are proposed for induction motors over the past years and direct torque control has gained great importance inside of them due to fast dynamic torque response behavior and simple control structure. This paper suggests a new approach on the direct torque controlled induction motors, Fuzzy logic based space vector
modulation, to overcome disadvantages of conventional direct torque control like high torque ripple. In the proposed approach, optimum switching states are calculated by fuzzy logic
controller and applied by space vector pulse width modulator to voltage source inverter. In order to test and compare the proposed DTC scheme with conventional DTC scheme
simulations, in Matlab/Simulink, have been carried out in different speed and load conditions. The simulation results showed that a significant improvement in the dynamic torque and speed responses when compared to the conventional DTC scheme.
Speed control of IM using Space Vector ModulationAsif Jamadar
This document presents a project on controlling the speed of a three-phase induction motor using space vector pulse width modulation (SVPWM). It discusses the aims of developing a simulation and prototype model for V/f speed control. It describes different PWM techniques and speed control methods for induction motors. It also explains the concepts of space vector modulation including voltage vectors, reference vectors, sector selection, and duty cycle calculation. The hardware and software implementation are outlined, including the inverter design, gate driver circuit, and MATLAB simulation model. Test results demonstrate varying the motor speed by adjusting the voltage and frequency while maintaining a constant V/f ratio.
Direct Torque Control (DTC) is widely applied for ac motor drives as it offers high performance torque control with a simple control strategy. However, conventional DTC poses some disadvantages especially in term of variable switching frequency and large torque ripple due to the utilization of torque hysteresis controller. Other than that, performance of conventional DTC fed by two-level inverter is also restricted by the limited numbers of voltage vectors which lead to inappropriate selection of voltage vectors for different speed operations. This research aims to propose a Constant Switching Frequency (CSF) torque controller for DTC of induction motor (IM) fed by three-level Neutral-Point Clamped (NPC) inverter. The proposed torque controller utilizes PI controller which apply different gain for different speed operation. Besides, the utilization of NPC inverter provides greater number of voltage vectors which allow appropriate selection of voltage vectors for different operating condition. Using the proposed method, the improvement of DTC drives in term of producing a constant switching operation and minimizing torque ripple are achieved and validated via experimental results.
A Survey: Space Vector PWM (SVPWM) in 3φ Voltage Source Inverter (VSI) IJECEIAES
Since last decades, the pulse width modulation (PWM) techniques have been an intensive research subject. Also, different kinds of methodologies have been presented on inverter switching losses, inverter output current/ voltage total harmonic distortion (THD), inverter maximum output of DC bus voltage. The Sinusoidal PWM is generally used to control the inverter output voltage and it helps to maintains drive performance. The recent years have seen digital modulation mechanisms based on theory of space vector i.e. Space vector PWM (SVPWM). The SVPWM mechanism offers the enhanced amplitude modulation indexes (MI) than sinusoidal PWM along with the reduction in the harmonics of inverter output voltage and reduced communication losses. Currently, the digital control mechanisms have got more attention than the analog counterparts, as the performance and reliability of microprocessors has increased. Most of the SVPWM mechanisms are performed by using the analog or digital circuits like microcontrollers and DSPs. From the recent study, analysis gives that use of Field Programmable Gate Arrays (FPGA) can offer more efficient and faster solutions. This paper discusses the numerous existing research aspects of FPGA realization for voltage source inverter (VSI) along with the future line of research.
Analysis of Direct Torque Control of Industrial Drives using Zone-Shifting SVMIJPEDS-IAES
Direct Torque Control of Induction Motor has gained popularity in industrial applications mainly due to its simple control structure from its first introduction in 1986. Here the direct torque control (DTC) of induction motor with zone shifting space vector modulation (SVM) has been done. It uses a simple phase current re-construction algorithm for three phase induction motor (IM). The phase current re-construction algorithm is done by using information from the current that is from the phases between the inverter and the induction motor. The proposed algorithm is robust and very simple. It uses the AC current to get the stator current for estimating the motor flux and the electromagnetic torque. By evaluating through the torque value and the current the controlling of induction motor is done. The simulation results are also given which supports the direct torque control strategy of the induction motor (IM).
Similar to Design Space Vector Modulated PWM Three-Phase Inverter (20)
Analysis of Direct Torque Control of Industrial Drives using Zone-Shifting SVM
Design Space Vector Modulated PWM Three-Phase Inverter
1. ELEC 490/492/498/499 Final Report:
Design and Implementation of a Space Vector Modulated
(SVM) PWM Three-Phase Inverter
Submitted By:
Group #34
Luc Lamarche
Nicholas Mochnacki
Faculty Supervisor:
Dr. Alireza Bakhshai
2. Executive Summary
Space vector (SV) pulse width modulation (PWM) has become an increasingly
implemented technique for 3-phase voltage source inverters (VSI) in applications for
induction and synchronous motors. SV PWM in contrast to sinusoidal pulse width
modulation (SPWM), offers greater DC- Bus utilization, and less commutation losses.[1]
This document provides a discussion of SV PWM, computer simulation of SP PWM, and
an implementation of SV PWM technique.
The SV PWM waveform pattern was implemented using software determined switching
patterns, based on the Timer Compare function using a PIC17F877A microcontroller,
which outputted its gating signals to a 3-phase inverter, and received its Timer Compare
function values via a Motorola 68HC11E microcontroller.
SV PWM waveforms are produced from the computer simulation and the implemented
SV PWM technique are presented and discussed in this report.
2
3. Table of Contents
1.0 Introduction..............................................................................................4
1.1 Purpose...................................................................................................4
1.2 Background and Objective.....................................................................4
1.3 Overview of the Project Work...............................................................4
2.0 Background and Motivation.................................................................... 5
2.1 Space Vector Theory .............................................................................5
2.1.1 Implementation....................................................................... 7
2.2 Specifications.........................................................................................7
3.0 Design and Production Approach............................................................7
3.1 Scheduling and Division of Labour.......................................................7
3.2 Simulation..............................................................................................8
3.3 Production and Design of a Physical SV PWM.....................................9
3.3.1 Inverter Module........................................................................... 10
........................................................................................................................
3.3.2 Inverter Control Module.............................................................. 11
........................................................................................................................
3.3.3 Calculation Module......................................................................13
3.3.4 User Interface Control Module....................................................15
3.3.5 Handshaking Between the Inverter Control and Calculation Module...........16
4.0 Testing, Evaluation And Results........................................................... 18
5.0 Conclusion............................................................................................. 20
6.0 References .....................................................................................................20
Appendix A............................................................................................................22
Appendix B............................................................................................................25
Appendix C............................................................................................................27
Appendix D............................................................................................................37
3
4. 1.0 INTRODUCTION
1.1 Purpose
This report summarizes the work and results produced by Group #34 of their design and
implementation of a SV PWM Three-Phase Inverter. The intended audience of the
documentation is Dr. Alireza Bakhshai (Faculty Supervisor), Constantin Siriteanu
(Course Instructor), and future Elec 490/492/498 project groups.
1.2 Background and Objectives
Technological advancements in high voltage transistors, has led to an increase in
industrial use of PWM techniques for 3-phase VSI. 3-phase PWM inverters are primarily
used in synchronous and induction motor drives.[2] Which allows for control of the
voltage and frequency delivered to the motor drive, offering an increase in performance
and efficiency delivered to the load. PWM techniques are implemented by providing
gating sequences to an inverter.
The goal of this project is to design and implement a SV PWM Three-Phase Inverter.
The process to achieve this goal required an in depth understanding of the SV PWM
before designing any device used for the project. Then, integrating our knowledge of SV
PWM with a computer simulation, this was done to confirm our knowledge of SV PWM
and prove that our design was capable of achieving the required output gating signals.
After success of the computer model, an overall design was produced and implemented.
1.3 Overview of the Project Work
Overview of the project work consisted of an in depth understanding of SV PWM theory
and implementation, a computer simulation, and a designed and implemented working
SV PWM device. The SV PWM theory is discussed in section 2.1 of this document.
Computer simulation is discussed in section 3.2 of this document. The design and
4
5. implementation of the SV PWM device implemented was broken into 4 modules. This
design and implementation is discussed in greater detail in section 3.3 of this document.
2.0 BACKGROUND AND MOTIVATION
The project was to build a 3 phase SV PWM. This required and understanding of SV
PWM theory, and a computer simulation to validate our understanding of SV PWM
theory, and ensure that our design and implementation of SV PWM was capable of
achieving the desired goal.
2.1 Space Vector Theory
Space vector theory is a method of controlling the three switches of the inverter to
efficiently convert a constant DC source to variable amplitude, variable frequency AC
power source. Since there are 3 switches for the 3-phase inverter, there are 8 (23
) possible
combinations. These states are mapped to a space vector diagram shown in figure 1. The
two states in which all switches are on and off correspond to the center of the space
vector diagram, it is referred to as the zero vector because its magnitude is equal to zero.
This leaves 6 vectors, which are marked with their switching pattern. Each of the vectors
is separated by 60 degrees and creates six divisions, which are called sectors, which are
numbered I-VI in figure 1. [3]
111
011
101
001
110
010
100
000
CBA
111
011
101
001
110
010
100
000
CBA
Vmax
?
Vref
100
110010
011
001 101
I
II
III
IV
V
VI
Figure 1: Space vector representation diagram
5
6. A reference vector (Vref) can be created through the principals of vector addition, by
switching from one vector to another for t1 and t2 seconds.[4] For example in our
diagram Vref would be created by switching to the (001) vector for t1 seconds and then to
the (011) vector for t2 seconds. Equation (1) calculates t1 and t2 for any given vector
angle.[4]
(1)
Where T is the cycle period and is given by equation (2) [4]
(2)
and K is the normalized amplitude constant that controls the amplitude of the vector and
can be calculated from equation (3).
K=Vref/VDC. (3)
Each of the six sectors were divided into three separate reference vectors (#vectors=3x6).
Switching through each reference vector in a counterclockwise rotation controls the
desired three-phase inverter output. The two parameters that control the output of the
inverter are f, which is a parameter to equation (2) and corresponds to the output
frequency and Vref, which is a parameter to equation (3), corresponds to the output
voltage. Therefore time t1 and t2 can be calculated through these parameters which are
controlled by the user.
To simplify the equation for use in a 16 bit microprocessor we create a constant Q.
(4)
where R=f/5 since we will only allow frequency increments of 5 Hz. The multiplier 5x106
is to convert the time in second to # cycles for a 5MHz processor.
6
7. New equation Subbing (4) into eqn. (1) gives us:
(5)
T= t1 + t2 + t0 where t0 is the time in which the inverter is switched to (000) or (111).
Therefore t0 can be solved by ,
t0=T - t2 - t1 (6)
2.1.1 Implementation:
The values produced from this equation are stored on a Motorola 68HC11
microprocessor. When the user specifies the frequency and voltage, the Motorola sends
the relative values from the table to the Inverter Control Module.
2.2 Specifications
The SV PWM is designed for an output frequency of 30 – 400 Hz, and output voltage of
of 30 – 208 Volts line-to-line RMS, from a DC source at 290 Volts.
3.0 DESIGN AND PRODUCTION APPROACH
The design and production approach of the project was broken down into 2 sections.
First section consisted of a computer simulation, and the second was actual physical
design and production of the SV PWM.
3.1 Scheduling and Division of Labour
The group met twice a week to discuss progress and timelines. Even with a few small
problems that were encountered, the project was successfully completed to our
supervisor’s satisfaction in time. Figure 2 shows the division of labour that was followed.
7
8. This is modified from the proposal since Hui Cheng did not participate in any of the work
therefore the division was recalibrated to compensate. The workload was effectively
divided equally between Nick Mochnacki and Luc Lamarche.
Space Vector Pulse
Width Modulator
Project
Division of Labour
Space Vector Theory
Luc Lamarche 50%
Nicholas Mochnacki %50
Hui Cheng 0%
Computer Simulation
Luc Lamarche 10%
Nicholas Mochnacki 90%
Hui Cheng 0%
Production and Design of
a Space Vector PWM
User Control Module Calculation Control
Module
Inverter Control
Module Inverter
Programming 2 Pic16F877A
Luc Lamarche 95%
Nicholas Mochnacki 5% (debugging)
Hui Cheng 0%
Assembly and SpeedWire
Implementation
Luc Lamarche 50%
Nicholas Mochnacki 50%
Hui Cheng 0%
Programming Motorola
Luc Lamarche 5%(debugging)
Nicholas Mochnacki 95%
Hui Cheng 0%
Parallel Port Communication
Testing and Debugging
Luc Lamarche 50%
Nicholas Mochnacki 50%
Hui Cheng 0%
Soldering
Luc Lamarche 90%
Nicholas Mochnacki 10%
Hui Cheng 0%
SpeedWire Implementation
Luc Lamarche 50%
Nicholas Mochnacki 50%
Hui Cheng 0%
First Draft Program (Fixed
Frequency and Voltage and
no Handshaking)
Luc Lamarche 0%
Nicholas Mochnacki 100%
Hui Cheng 0%
Final Program (Designed for
Variable Voltage and
Frequencey and with
Handhaking)
Luc Lamarche 100%
Nicholas Mochnacki 0%
Hui Cheng 0%
LED 7-Segment Display Theory
Luc Lamarche 50%
Nicholas Mochnacki 50%
Hui Cheng 0%
Parallel Port
Communication Testing
and Debugging
Luc Lamarche 50%
Nicholas Mochnacki 50%
Hui Cheng 0%
Parallel Port Communication
Testing and Debugging
Luc Lamarche 50%
Nicholas Mochnacki 50%
Hui Cheng 0%
Soldering and
SpeedWire Assembly
Luc Lamarche 50%
Nicholas Mochnacki 50%
Hui Cheng 0%
Figure 2: Division of Labour
3.2 Simulation
Using Simulink in Matlab, a simulation was done to ensure that our understanding of SV
PWM theory was correct to produce a functional SV PWM. The Simulink model
allowed for a variable voltage and variable frequency from a 290 volts DC voltage
source. Figure 3 depicts the Power Spectral Density (PSD) of the output achieved for the
computer simulation at 60 Hz and 100 Volts L-L RMS. The Significance of this model,
not only ensured that we were able to produce three sinusoidal outputs out of phase by
8
9. 120 degrees but also that harmonics of multiples of three cancel out when voltages are
connected line-to-line. Figure 3, shows that harmonics from a single-phase output
(depicted on the left) are canceled out for line-to-line voltage, (depicted on the right).
Further Documentation of the Simulation can be found in the Appendix A.
Figure 3: The PSD of Va phase on and Va-b line-line
3.3 Production and Design of a Physical SV PWM
The overall system consisted of 4 Layers (see figure 4), designed with low coupling and
high cohesion. The first layer is the User Interface Control module. It is an interface that
allows a user to change the frequency and voltage of the desired 3-phase output. The
second layer accepts the new frequency and voltage and processes the new control
signals that will realize this new output. It then passes calculated information to the third
layer, which is called the Inverter Control module. This layer is responsible for realizing
the new information and creates the proper control signals. These signals are fed to the
fourth layer, which is the inverter. The inverter uses theses signals to convert a DC source
to a 3-phase power source according to the user specifications.
The approach taken in the project to realize the block diagram in figure 4 is shown in
figure 5. This section describes in detail the individual modules in reverse sequence
starting from the Inverter module and ending at the User Interface Control module.
9
10. Figure 4: Project Block Diagram
Figure 5: Project Layout
3.3.1 Inverter Module
The Inverter is a device that accepts a DC source as its input and converts it to an variable
voltage, variable frequency 3-phase source. Figure 6 shows a simplified inverter
representation.[2] The outputs are taken at Va, Vb and Vc, where each of these outputs are
out of phase by 120 degrees, creating the 3-phase output. The frequency and voltage is
determined by the six switches shown in figure 6 as A, B, C, A’, B’ and C’. The job for
the Inverter Control module is to control these switches in a specific pattern with specific
timing determined by the space vector theory described in section 2.1. Even though 6
switches are controlled, only three are considered since three of the switches are the
1
11. compliments of the other three. For example when A is closed A’ must be opened. This
leads to the 8 different combinations (23
) that are used in space vector theory.[1]
Figure 6: Simplified inverter representation
The inverter that was used is the IRAM. This chip included a gate drive that isolated the
inverter circuit with the Inverter Control module.
3.3.2 Inverter Control Module
The Inverter Control Module, shown in Figure 5, controls the 3 switches of the inverter
circuit (Figure 6). The module uses the PIC16F877A microprocessor with a 20Mhz
clock. The main function for this module is to output the specific vector sequences (or
switching patterns) to the inverter for the time delay that was calculated using the space
vector theory in section 2.1. These calculated delays are passed to the module by the
Calculation module with a full handshake process whenever a new frequency and
amplitude is entered. The module’s process is shown in the flow chart in Figure 7. As the
figure shows, the processor is in a continuous loop. After going through the appropriate
initialization steps it starts the loop by checking the current sector. If the sector value
reads a 6 then we have done a full rotation of the vector space and it is reset back to 0.
Otherwise it continues by obtaining the delay value t0 found in the memory and
outputting the zero vectors for t0 clock cycles. It then follows by outputting vector 1 and
vector 2 for t1 and t2 clock cycles respectively. Through vector addition, this process
creates a single vector.[1] It then loops back and creates a second and third vector with
1
12. angles and lengths specified by the delay times. These three vectors are shown in figure 8
with angles 10, 30 and 50 degrees. After the third vector is produced, the vector value
will increment to 4 and is detected by the processor, which then resets the vector value
back to 0 and increments the sector value. This process is repeated until we complete all
six sectors of the space vector diagram (Figure 1) and then restarts itself back in the first
sector completing a full rotation.
Figure 7: Flow Chart
1
13. Figure 8 for Inverter Control Module
The code in assembly language that implements the inverter control module with the
PIC16F877A microprocessor can be found in appendix B.
In addition to the main program that creates the vector rotation, there is also an interrupt
subroutine that updates the delay values in the memory by accepting values from the
Calculation module using a full handshake technique. This technique is described in
section 3.2.5.
3.3.3 Calculation module
The Calculation module, shown in Figure 5, determines the width of each pulse outputted
by the Inverter Control module. The Calculation module is loaded with tables for each
selected frequency and voltage implemented by the User Interface Control module. Each
table consists of 42 bytes of data, corresponding to the chosen frequency and voltage.
The data contained in the table consists of 21 pulse width times, each being 2 bytes in
length. The overall function of the Calculation module is to receive the frequency and
voltage from the User Interface module when the enter switch is engaged. The module
then determines the 21 pulse width times for the chosen frequency and voltage, and
transmits the 42 bytes of data to the inverter control module via parallel port
handshaking.
1
14. The Calculation module is implemented using a Motorola 68HC11E microcontroller.
Table 1 below indicates the configuration of the Pin and their corresponding purpose for
the Motorola 68HC11E.
Table 1 Configuration of Motorola 68HC11E I/O Pins
Pin I/O Purpose
STRA Input Enter switch pushed by user
PortB Output Data bus transmitted to the Inverter Control Module
PortC Input Data bus contains Frequency from the User Interface Control Module
D0 Input Receives Ack from the Inverter Control Module for Handshaking
D2-D5 Output Sends Int/Ready/Ack/Done bits to Inver Control Module for Handshaking
PortE Input Data bus contains Voltage from the User Interface Control Module
The Calculation module used a Motorola 68HC11E, its Flow Chart is displayed in
Figure 9. The Motorola performs a continous loop while checking the status of STRA,
and repeats this loop until the STRA is low. After the STRA is set low, the inputted
voltage and frequency are received and stored from the User Interface Control module,
from PortE and PortC, respectively. The Motorola then determines the address of the 42
Byte table stored in its ROM that corresponds to the given frequency and voltage. Then
it performs a full handshake with the Inverter Control module (which is explained
Section 3.2.5). After the completion of the handshake, the program then returns to its
loop, checking the status of STRA.
1
15. Figure 9 Flow Chart of the Motorola HC11E performing its role as the Calculation Module
3.3.4 User Interface Control Module
Figure 10: User Interface Control Module schematic
1
16. The User Interface Control module shown in Figure 5 as two control dial symbols, allows
a user to change the 3-phase AC supply output to a desired frequency and voltage. A
detailed schematic representation of the control is shown in figure 10. The design and
implementation for the two controls are essentially identical therefore only one control
needs to be described. As shown in figure 10, the controls are in digital form. Three 7-
segment LEDs display the voltage/frequency and two push buttons below are used to
increment or decrement the current displayed value. Once a desired voltage and
frequency is selected the user must push the enter button shown in figure 5 in order to
activate the changes. The processor used for the module was the same as the one used for
the Inverter Control module, which is the PIC16F877A. This allowed a faster
implementation since only one type of assembly language had to be learned to code both
modules.
In addition to displaying the voltage/frequency through the LED display, the processor
also outputs the displayed value in binary form to port C, which is connected to the
Calculation module. When the enter button is pushed, an interrupt is triggered in the
Calculation module and it can capture the 8 bits representation of the desired
voltage/frequency from User Interface module.
The code in assembly language that implements the User Interface Control module with
the PIC16F877A microprocessor can be found in appendix C.
3.3.5 Handshaking Between the Inverter Control and Calculation Module
After the Calculation module has determined the address in its ROM corresponding to the
frequency and voltage, it fires an interrupt to the Inverter Control module. The interrupt
halts the Inverter Control module outputting sequence to the Inverter module. Then the
Calculation Module loads the Data Bus and sends a ready bit to the Inverter Control
Module. This ready bit indicates to the Inverter Control module that the data bus is
loaded with new data, and receives the data. After the Inverter Control module has
received and stored this data, it sends an acknowledge bit to the inverter control module.
This acknowledge bit sent to the Calculation module indicates that the data has been
1
17. successfully received and in response to the acknowledge bit, the Calculation module sets
its ready bit low and sends its own acknowledge bit in response. This acknowledge bit
from the Calculation module then lets the Inverter Control module know that the
Calculation module has received its acknowledge. The Calculation module acknowledge
bit then times out. The Calculation module will either load the data bus with a new value
and repeat this handshaking process starting at the ready bit, or it will send a done bit.
The done bit sent by the Calculation Module tells the Inverter Control Module to exit the
interrupt and return to its outputting sequence to the Inverter module. The done bit times
out and returns to outputs low.
Figure 11 Parellel Port Handshaking Between the Calculation Module and Inverter Control Module
Figure 11, is a waveform of the handshaking between the 2 modules. The Calculation
module was used with Motorola 68HC11E working at 8 MHz. The Inverter Control
module was used with a PIC16F877A clocked at 20 MHz. Since the clocks are working
at different speeds, standalone Asynchronous Parallel Port communication was used. This
also explains why full handshaking was deemed essential, as pulse handshaking could
have proved unreliable for 2 different chips working at different clock speeds (8 & 20
MHz), and different Architectures (RISC and CISC).
1
18. 4.0 TESTING, EVALUATION AND RESULTS
In order to test the design, the output that was measured was taken at the Inverter Control
module output. The reason for this is that the inverter that was purchased was damaged
and was not functioning properly. Taking the measurements of the switching sequence is
essentially the same as taking the measurements at the output since the inverter acts as an
amplifier. Therefore instead of having a DC input of 290V we can treat it as having a DC
input of 5V, which is the maximum swing for the output of the processor.
In order to test the system, two frequencies were used, one at 100Hz and the other at
200Hz with both voltages at 0.6*Vdc. Figure 12 shows the line-to-line output sequence of
the inverter control module.
In order to measure the fundamental frequencies for these pulses a capacitor was used to
filter out the harmonics of the line-to-line signal. In order to show the 120 degrees phase
different between two different outputs, two of the output signals were filtered and
measured as shown in figure 13. This shows the fundamental frequency sine waves of the
two phases. As shown in the figure, the frequency for the 100Hz was measured to be
98.96Hz and 98.81Hz for the two output phases, which gives an error of 1.04Hz and
1.19Hz respectively. The frequency measured for the 200Hz output was 197.2Hz and
194.6Hz. Therefore the 200Hz signals had errors of 2.8Hz and 5.4Hz respectively. The
amplitude difference going from 100Hz to 200Hz in figure 13 are not accurate since a
basic capacitor was used as the filter and therefore does not have a constant amplitude
response.
Figure 14 shows the Fast Fourier Transform for the pulse in figure 12. Unwanted
harmonics are shown to exist close to the fundamental frequencies of 100Hz and 200Hz.
Ideally the system should only have harmonics that are far from the fundamental and can
easily be filtered. With the closer harmonics it is difficult to filter them out.
Although the voltages could not be measured accurately, the fact of getting accurate
frequencies means that the calculation module is producing the proper vector rotation
1
19. calculations and it is highly likely that the magnitude component or voltage is correct as
well.
Figure 12: measured line-to-line output pulse sequences
a) For frequency=100Hz and voltage=0.6Vdc b) For frequency=200Hz and voltage=0.6Vdc.
Figure 13: Two phase output with filter
a) For frequency=100Hz and voltage=0.6Vdc b) For frequency=200Hz and voltage=0.6Vdc.
Figure 14: Fast Fourier Transform of pulse sequence
1
a) For frequency=100Hz and voltage=0.6Vdc. b) For frequency=200Hz and voltage=0.6Vdc.
20. 5. CONCLUSION
The space Vector Pulse Width Modulated Three Phase Inverter was successfully design
and constructed. The final product includes a User Interface control module that allows a
user to easily specify a voltage and frequency through the digital display. This
information is then fed to the Calculation module, where it processes the information and
determines the appropriate control signals and passes this data to the Inverter Control
module where it is realizes and controls the inverter to obtain the desired output. After
testing the system, we have determined that the frequencies are relatively accurate.
Although actual measurements could not be taken for the voltages, the accuracy should
be approximately the same as the frequency since the calculation module was shown to
produce the proper control signals.
In the future this project could be tested with a 3-phase motor. In addition a feedback
network could be added to measure the output frequency and voltage and feed it back to
the calculation module to correct any errors.
6.0 REFERENCES
[1] Victor R. Stefanovic, and Slobodan N. Vukosavic, “Space vector PWM Voltage
Control with Optimized Switching Strategy,” IEEE IAS-1992 Ann. Meeting, pp. 1025 -
1033.
[2]Zhenyu Yu, "Space-Vector PWM With TMS320c24x/F24x Using Hardware and
Software Determined Switched Patterns", Texas Instruments, Literature Number
SPRA524, March 1999
[3]. N. Mohan, W. Sulkowski, P. Jose, T. Brekken. Including Voltage Space Vector
PWM in Undergraduate Courses. Department of Electrical Engineering at the
University of Minnesota. MN [online]. Available:
http://www.ece.umn.edu/groups/PowerElectronics_Drives/svpwm.pdf
[4] Backshai A, Fast Space Vector Modulation Based on A Neurocomputing Digital
Signal Processor. Department of Electrical & Computer Engineering at Concordia
University. IEEE, 1997
2
21. LIST OF APPENDICES
Appendix A: Simulink Model
Appendix B: code for inverter control module
Appendix C: code for User Interface Control module
Appendix D: code for Calculation Module
2
22. Appendix A: Simulink Model
This Appendix provides a diagram of the Simulink model design for the Space vector
pwm. The graphs presented are the gating sequence of the three phases, the Line-Line
voltage of Vca, and the Fundamtal harmonic line-line voltage of Vab, Vbc, and Vca.
Figure 1: Simulink Diagram of Space Vecto PWM
22
23. Figure 2: Gating sequence for the three phases for 93 V rms per phase
Figure 3: Vca line-line voltage
23
24. Figure 4: V out of the fundamental frequency for line to line voltages Vab, Vbc, and Vca
24
25. APPENDIX C
;**********************************************************************
;Inverter Control Module
;**********************************************************************
list p=16f877A ; list directive to define processor
#include <p16f877A.inc> ; processor specific variable definitions
__CONFIG _CP_OFF & _WDT_OFF & _BODEN_OFF & _PWRTE_ON & _RC_OSC & _WRT_OFF &
_LVP_ON & _CPD_OFF
;***** VARIABLE DEFINITIONS
w_temp EQU 0x75 ; variable used for context saving
status_temp EQU 0x76 ; variable used for context saving
pclath_temp EQU 0x77 ; variable used for context saving
tableAdd EQU 0x78
VECTOR EQU 0x79
i EQU 0x7A
counterHi EQU 0x7B
counterLo EQU 0x7C
temp EQU 0x7D
table EQU 0x7E
portb000 equ 0x38
portb000a equ 0xb8
portb001 equ 0xb1
portb010 equ 0xaa
portb011 equ 0xa3
portb100 equ 0x9c
portb101 equ 0x95
portb110 equ 0x8e
portb111 equ 0x87
;**********************************************************************
ORG 0x000 ; processor reset vector
nop ; nop required for icd
goto main ; go to beginning of program
;///////////int///////////
ORG 0x004 ; interrupt vector location
movwf w_temp ; save off current W register contents
movf STATUS,w ; move status register into W register
movwf status_temp ; save off contents of STATUS register
movf PCLATH,w ; move pclath register into w register
movwf pclath_temp ; save off contents of PCLATH register
movlw 0x20
movwf tableAdd
CALL reset
bcf INTCON,1
movf pclath_temp,w ; retrieve copy of PCLATH register
movwf PCLATH ; restore pre-isr PCLATH register contents
movf status_temp,w ; retrieve copy of STATUS register
movwf STATUS ; restore pre-isr STATUS register contents
swapf w_temp,f
swapf w_temp,w ; restore pre-isr W register contents
retfie ; return from interrupt
;////////////end of interupt//////////////
Table1
addwf PCL, 1
retlw portb000
retlw portb001
retlw portb011
retlw portb111
retlw portb011
retlw portb001
25
35. movf i2,0
sublw d'9'
btfsc STATUS,Z
goto doneinc
inc
incf freq,1
movf freq,0
movwf PORTC
movf i0,0
sublw d'1' ;check to see if its a 1(5)
btfsc STATUS,Z ;if it is not skip
goto checki1
incf i0,1
goto doneinc
checki1 ;at this point we know it i0 was a 5
clrf i0
incf i1,1
movf i1,0
sublw d'10' ;check if i1 is at 10
btfss STATUS,Z ; if it is then goto checki2
goto doneinc
checki2
clrf i1
incf i2
movf i2,0
sublw d'10' ;check if i2 is at 10
btfss STATUS,Z ; if it is then reset to 9
goto doneinc
decf i2 ;we are at max freq and therefore go
back to 9
decf freq ;we are at max freq and therefore go back to
max freq value
doneinc
CALL delay2 ;I could put more here for switch debuncing
RETURN
decFreq:
movf i0,0
btfss STATUS,Z
goto dec1
movf i1,0
btfss STATUS,Z
goto dec1
movf i2,0
btfsc STATUS,Z
goto donedec
dec1
decf freq,1
movf freq,0
movwf PORTC
movf i0,0
sublw d'1' ;check to see if its a 1(5)
btfss STATUS,Z ;if it is skip
goto checki12
decf i0,1
goto donedec
checki12 ;at this point we know it i0 was a 0
incf i0
decf i1
movf i1,0
sublw 0xFF
btfss STATUS,Z ; check if i1 was at 0, if it is then goto checki22
goto doneinc
checki22
35
36. movlw d'9'
movwf i1
decf i2
movf i2,0
sublw 0xFF
btfss STATUS,Z ; check if i2 was at 0, if it is then reset to 0
goto doneinc
clrf i2
incf freq ;to set back to minimum
donedec
CALL delay2 ;I could put more here for switch debuncing
RETURN
delay2:
clrf temp
delayloop1
incf temp
btfss STATUS,Z
goto delayloop1
RETURN
delay:
clrf temp2
clrf temp3
pauseloop1
clrf temp
pauseloop2
incf temp
btfss STATUS,Z
goto pauseloop2
incf temp2
btfss STATUS,Z
goto pauseloop1
clrf temp2
incf temp3
movf temp3,0
sublw d'10'
btfss STATUS,Z
goto pauseloop1
RETURN
Table1
addwf PCL, 1
retlw LED0
retlw LED5
Table2
addwf PCL, 1
retlw LED0
retlw LED1
retlw LED2
retlw LED3
retlw LED4
retlw LED5
retlw LED6
retlw LED7
retlw LED8
retlw LED9
END ; directive 'end of program'
36
37. APPENDIX D
Calculation Module
PORTA EQU $1000
PIOC EQU $1002
PORTC EQU $1003
PORTB EQU $1004
PORTCL EQU $1005
DDRC EQU $1007
PORTD EQU $1008
DDRD EQU $1009
PORTE EQU $100A ;ADDRESS OF PARALLEL PORT E
OUTPUTE EQU $0000
OUTPUTCL EQU $0001
ORG $D000
BUF_START RMB 255 (A 256 BYTE BUFFER TO RECEIVE VALUES)
BUF_END RMB 1 (LAST BYTE OF BUFFER)
ORG $CB00
LDS #$CFFF (INITIALIZE STACK POINTER)
JSR SETSOURCE (SET SOURCE OF DATA ON PC7-PC0)
JSR INITC (INITIALIZE PORT C)
JSR INITD
LDAA #$00
STAA PORTD
START
LDAA PIOC (ARM STAF-CLEARING MECHANISM)
LDAA PORTCL (CLEARS STAF AND PRODUCES A STRB)
STAA PORTD
LDAA PORTCL
STAA OUTPUTCL
LDAA PORTE
STAA OUTPUTE
JSR POLL
37
38. JSR UPDATE ; THIS SUB-ROUTINE DETERMINES THE TABLE TO BE USED.
THE X REGISTER STORE THE ADDRESS
JSR HANDSHAKE
LDAA #$00
STAA PORTD
LDY #$FFFF ;LOAD BIGGEST PO SSIBLE VALUE
INTO X REGISTER
DLOOP3 DEY ;DECREMENT X
BNE DLOOP3 ;THIS LOOP IS FOR EXPERIMENTAL
USE ONLY
BRA START ; RE INITSTAFF MECH
*=====EXIT TO BUFFALO
SWI
INITC CLR DDRC
LDAA #$15
STAA PIOC
RTS
INITD LDAA DDRD
ANDA #%11000000
ORAA #%00111100 ; USUALLY 00111100
STAA DDRD ; PIN 2 .3, 4 ,5 ARE OUTPUTS, PINS 0,1 ARE
INPUTS
RTS
POLL
LDAA #$00
STAA PORTB
LDAA PIOC (4) (READ PIOC TO ARM STAF CLEARING MECHANISM)
ANDA #$80 (2) (CHECK IF STAF=1)
BEQ POLL (3) (STAF=0, CHECK AGAIN)
RTS
38
40. NOP
NOP
NOP
NOP
NOP
NOP
LDY #$00FF ;LOAD BIGGEST PO SSIBLE VALUE INTO X REGISTER
DLOOPA DEY ;DECREMENT X
BNE DLOOPA ;LOOP BACK IF RESULT WAS NOT ZERO
LDAA #%00010000 ;SEND ACK AND TEST DONE
STAA PORTD
DECB ;DECREMENT ACCUM B
BEQ HANDDONE ;IF IT IS ZERO, THEN BRANCH TO END
; BUFFER SET OUTPUTS TO ZERO BEFORE PROPER OUTPUT
NOP
NOP
INX
LDAA 0,X
STAA PORTB
NOP ;PADDING
NOP
NOP
LDAA #%00001000 ;SEND READY
STAA PORTD
BRA HANDLOOP
HANDDONE LDAA #%00100000 ; SEND AND TEST ACK DONE BIT
STAA PORTD
LDY #$FFFF ;LOAD BIGGEST PO
SSIBLE VALUE INTO X REGISTER
DLOOP5 DEY ;DECREMENT X
BNE DLOOP5 ;THIS LOOP IS FOR EXPERIMENTAL USE ONLY
LDY #$FFFF ;LOAD BIGGEST PO SSIBLE VALUE INTO X
REGISTER
40