Draw Hybrid Automaton Model of Thermostat in TikZ

  • This post is about drawing the hybrid automaton model of thermostat in LaTeX using TikZ package and automata library. We will learn how to draw states corresponding to the operation modes of the thermostat. Moreover, we will highlight transitions between modes and specify the initial state of the automaton.
Hybrid automaton Model of thermostat TikZ

Short description

  • The thermostat model has two operation modes: Mode 1 and Mode 2. These modes can be drawn using the \node command with state option. The initial state of the automaton corresponds to mode 1 and to set it in TikZ we add the option initial and initial text =<label> to the corresponding node. Each node has text which is provided between braces {} and to get multiline text we add \\ together with align option. Check the code below for more details!

TikZ code of hybrid automaton model of thermostat




	node distance=5cm,
	on grid,

% Mode 1    
	initial text = {$x_0,q_1$},
	inner sep=5pt
] (q_0) 
	Mode $1$ \\[10pt]

% Mode 2    
	inner sep=5pt
] (q_1) [right=of q_0] 
	Mode $2$ \\[10pt]

% Transitions
\path [-latex]
	(q_0) edge [bend left=45] 
		node [above] {$x\in\mathcal{S}_{1,2}$} (q_1)
	(q_1) edge [bend left=45]   
		node [below] {$x\in\mathcal{S}_{2,1}$} (q_0);

  • If you would to see a detailed tutorial about it, leave me a comment below or reach me via e-mail at admin@latexdraw.com, I will be happy to hear from you!

Leave a Comment: