Can somebody help me to draw this scheme using tikz trees, please?

I want to draw this scheme

\begin{tikzpicture}[
every node/.style = {shape=rectangle, rounded corners,
draw, font=\small, align=center, fill=white},
level 1/.style = {sibling distance = 10em},% <-- new
level 2/.style = {sibling distance = 9em},% <-- new
level 3/.style = {sibling distance = 8em},% <-- new
level 4/.style = {sibling distance = 8em},% <-- new
]
\node {Estabilidade de Sistemas\\Elétricos de Potência}
[edge from parent fork down]
child {node {Estabilidade do\\Ângulo do Rotor}
child {node {Estabilidade Angular\\a Pequenos Distúrbios}}
child {node {Curto Prazo}}}}
child{node{Curto Prazo}}
child{node{Longo Prazo}}}
child {node{Curto Prazo}}}
child {node {Estabilidade de\\Tensão a Pequenas\\Perturbações}
child {node{Longo Prazo}}}};
\end{tikzpicture}


But I'm getting this

I don't know how to make two nodes have the same childs and make the correct vertical spacings.

• Welcome! Would using forest be an option?
– user194703
Oct 28, 2019 at 16:35
• This is not formally a tree, so you'll have to do some manual work to make multidominant roots. But the base tree methods in TikZ are unfortunately never ideal, since they do no automatic positioning. As @Schrödinger'scat suggests, it would be better to use forest. But since this is not a tree see e.g. Lost in the Forest -- Merging after Branching? for some ideas. Oct 28, 2019 at 17:16

This is not a perfect solution. Used missing child to ‘make’ two nodes have the same child.

\documentclass[border=3mm]{standalone}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetikzlibrary{trees}

\begin{document}

\begin{tikzpicture}[
every node/.style = {shape=rectangle, rounded corners,
draw, font=\small, align=center, fill=white},
level 1/.style = {sibling distance = 10em},% <-- new
level 2/.style = {sibling distance = 9em},% <-- new
level 3/.style = {sibling distance = 8em},% <-- new
level 4/.style = {sibling distance = 8em},% <-- new
]
\node {Estabilidade de Sistemas\\Elétricos de Potência}
[edge from parent fork down]
child {node {Estabilidade do\\Ângulo do Rotor}
child {node {Estabilidade Angular\\a Pequenos Distúrbios}
child[missing] child{}}
child {node[xshift=-3.6mm] {Curto Prazo}}child[missing]}}
child{child{
child{node{Curto Prazo}}
child{node{Longo Prazo}}}}}
child[missing]  child[missing] child {node{Curto Prazo}}}
child {node {Estabilidade de\\Tensão a Pequenas\\Perturbações}
child {node{Longo Prazo}}child[missing] child[missing]
}};
\end{tikzpicture}

\end{document}

• Thanks a lot! That's exactly what I was looking for! Oct 28, 2019 at 19:23
• Just a quick note: include \usepackage[T1]{fontenc} so the accented glyphs are visible. :) Oct 28, 2019 at 19:30
• Thanks for the update! I wish I could +1 again! :) Oct 28, 2019 at 19:43
\documentclass[border=12pt]{standalone}

\usepackage[edges]{forest}

\begin{document}

\begin{forest}
for tree={align=c,draw,rounded corners, tier/.option=level, anchor=base, l sep'+=10pt},
forked edges,
before typesetting nodes={
where content={}{phantom}{}
},
before drawing tree={
where n children=0{
if={>O{!u.phantom}}{
tikz+={\draw (!up.parent anchor) -- +(0pt,-\foresteoption{fork sep}) -| (.child anchor) (!un.parent anchor) -- +(0pt,-\foresteoption{fork sep}) -| (.child anchor);}
}{}
}{}
},
[
[Curto Prazo]
]
]
[\strut\\\strut\\\strut, draw=none, child anchor/.option=parent anchor
[Curto Prazo]
[Longo Prazo]
]
]
[
[Curto Prazo]
[Longo Prazo]
]

• Nice answer, as always! +1 from me, cwac! :) Oct 28, 2019 at 19:43