% 3-Level Space Vector Modulation (SVM)
% Author: Amir Ostadrahimi
\documentclass [border=1pt]{standalone}
\usepackage{tikz}
\usepackage{xcolor} %package to define rgb colors
%define new colors
\definecolor{MatlabBlue}{rgb}{0 0.4470 0.7410} % define the blue color of the Matlab
\definecolor{MatlabBrown}{rgb}{0.8500 0.3250 0.0980} % define the brown color of the Matlab
\definecolor{MatlabYellow}{rgb}{0.9290 0.6940 0.1250} % define the yellow color of the Matlab
% define parameters
\newcommand\fillsize{1.5} %fillsaize= filling of the intersected vectors
\newcommand\Xone{1 cm} % x shift of the region name type 1
\newcommand\Yone{0.35 cm} % y shift of the region name type 1
\newcommand\Ytwo{0.85 cm} % y shift of the region name type 2
\newcommand\Vnamecolor{MatlabBlue} % vectron names color
\newcommand\Rnamecolor{MatlabBrown} %Region names color
\newcommand\axx{4.3} %axx= axis_x
\newcommand\axy{4.1} %axy= axis_y
%
\begin{document}
\begin{tikzpicture}
%coordinate
\draw (0,0) coordinate (P0);
\draw (P0)++(\axx,0) coordinate [ label={ [color=gray, xshift=1, yshift=2] \large $\alpha$ }, color=gray!70] (P1){};
\draw (P0)++(-\axx,0) coordinate (P2);
\draw (P0)++(0,\axy) coordinate [label={[color=gray, xshift=8, yshift=-17] \large $\beta$ }] (P3) {};
\draw (P0)++(0,-\axy) coordinate(P4);
\draw [->, very thick, color=gray!70] (P2)--(P1);
\draw [->, very thick, color=gray!70] (P4)--(P3);
% Vectors
%Large Vectors
\draw (0,0) -- (4,0) coordinate [label={[MatlabBlue, xshift=-16, yshift=-2] \large $pnn$ }] (PNN) ;
\filldraw [black] (PNN) circle (\fillsize pt);
\draw (0,0) -- (2, 3.464) coordinate [label={[MatlabBlue, xshift=-8, yshift=-1] \large $ppn$ }](PPN) ;
\filldraw [black] (PPN) circle (\fillsize pt);
\draw (0,0) -- (-2, 3.464) coordinate[label={[MatlabBlue, xshift=1, yshift=-1]\large $npn$ }] (NPN) ;
\filldraw [black] (NPN) circle (\fillsize pt);
\draw (0,0) -- (-4,0) coordinate [label={[MatlabBlue, xshift=-8, yshift=-1] \large $npp$ }] (NPP);
\filldraw [black] (NPP) circle (\fillsize pt);